/* ChargeSurfing Web App - Clean mobile design */
@import url("connector-badges.css");

:root {
    --brand-primary: #0d6efd;
    --brand-primary-hover: #0b5ed7;
    --brand-primary-soft: rgba(13, 110, 253, 0.08);
    --brand-primary-softer: rgba(13, 110, 253, 0.06);
    --brand-primary-soft-border: rgba(13, 110, 253, 0.4);
    /* List / card accents: semantic status — never inherit brand (red brands ≠ error) */
    --status-active: #16a34a;
    --status-active-soft: rgba(22, 163, 74, 0.08);
    --status-active-ring: rgba(22, 163, 74, 0.18);
    --status-invalid: #dc2626;
    --status-neutral: #9ca3af;
    --list-rail-neutral: #d1d5db;
    --header-height: 56px;
    --sidebar-width: 280px;
    /* Notch / status bar; phones often report 0 in WebView — floor applied in mobile MQ */
    --webview-safe-top: env(safe-area-inset-top, 0px);
    --header-total-height: calc(var(--header-height) + var(--webview-safe-top));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f7;
    min-height: 100vh;
    padding-top: var(--header-total-height);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.sidebar-open {
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 85vw;
    background: #fff;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    padding-top: var(--webview-safe-top);
}
.sidebar.open {
    transform: translateX(0);
}

.sidebar-brand {
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid #e5e5e7;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1d1d1f;
}

.sidebar-brand-link:hover {
    color: var(--brand-primary);
}

.sidebar-menu-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
    padding: 6px;
    box-sizing: border-box;
    background: var(--brand-logo-menu-bg, #fff);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.sidebar-brand-name {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sidebar-brand-subtitle {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #86868b;
    line-height: 1.25;
}

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e5e5e7;
    font-size: 0.75rem;
    color: #86868b;
    line-height: 1.35;
}

.sidebar-disclaimer {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #fff8e6;
    border: 1px solid #f0d78c;
    color: #5c4a12;
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: left;
}

.platform-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.platform-attribution-brand {
    display: block;
    color: var(--brand-primary, #0d6efd);
    font-weight: 600;
    font-size: 1.05em;
    line-height: 1.3;
    text-decoration: none;
}

.platform-attribution-brand:hover {
    color: var(--brand-primary, #0d6efd);
    text-decoration: underline;
}

.platform-attribution-link {
    display: block;
    color: #8e8e93;
    font-size: 0.82em;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.platform-attribution-link:hover {
    color: #636366;
    text-decoration: underline;
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.profile-lang-field {
    margin-top: 0.25rem;
    position: relative;
    z-index: 20;
}

.lang-picker {
    position: relative;
}

.lang-picker-trigger {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    text-align: left;
    cursor: pointer;
    background: #fff;
}

.lang-picker-trigger:focus {
    outline: none;
    border-color: var(--brand-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.lang-picker-flag {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.lang-picker-label {
    flex: 1;
    font-size: 1rem;
    color: #212529;
}

.lang-picker-chevron {
    flex-shrink: 0;
    color: #86868b;
    transition: transform 0.15s ease;
}

.lang-picker.is-open .lang-picker-chevron {
    transform: rotate(180deg);
}

.lang-picker-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lang-picker-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: #212529;
    font-size: 1rem;
}

.lang-picker-option:hover,
.lang-picker-option:focus {
    background: #f5f5f7;
    color: #212529;
}

.lang-picker-option.is-active {
    background: rgba(13, 110, 253, 0.08);
    font-weight: 600;
}

.lang-picker-option-label {
    flex: 1;
}

.lang-picker-check {
    flex-shrink: 0;
    color: var(--brand-primary, #0d6efd);
}

.card-profile,
.card-profile .card-body {
    overflow: visible;
}

.card:has(.profile-lang-field) {
    overflow: visible;
}

.card:has(.profile-lang-field) .card-body {
    overflow: visible;
}

.sidebar-user {
    flex: 1;
}

.user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.875rem;
    color: #86868b;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #86868b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -0.25rem;
    margin-right: -0.5rem;
}
.btn-close:hover {
    color: #1d1d1f;
}

.sidebar-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease;
}
.menu-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}
.menu-item span {
    flex: 1;
}
.menu-item:hover {
    background-color: #f5f5f7;
}
.menu-item:hover svg {
    opacity: 0.9;
}
.menu-item.active {
    color: var(--brand-primary);
    font-weight: 500;
    border-left-color: var(--brand-primary);
    background-color: var(--brand-primary-softer, rgba(13, 110, 253, 0.06));
}
.menu-item.active svg {
    opacity: 1;
}

/* Header — fixed + safe-area so hamburger stays tappable above Maps / status bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-total-height);
    padding-top: var(--webview-safe-top);
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    z-index: 2000;
}

.btn-hamburger {
    position: relative;
    z-index: 2001;
    background: none;
    border: none;
    padding: 0.65rem;
    margin: 0;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 6px;
    transition: background-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
}
.btn-hamburger svg {
    display: block;
}
.btn-hamburger:hover {
    background-color: #f5f5f7;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
    color: #1d1d1f;
    margin: 0 0 0 0.75rem;
    padding: 0;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

/* Main content */
.main {
    padding: 1.25rem 1rem;
    min-height: calc(100dvh - var(--header-total-height));
    display: flex;
    flex-direction: column;
}

/* Table */
.table-responsive {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    margin: 0;
}

.table thead th {
    background-color: #f8f9fa;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #e5e5e7;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.location-name {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.location-address {
    font-size: 0.875rem;
    color: #86868b;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
}

.bg-success {
    background-color: #34c759;
    color: #fff;
}

.bg-secondary {
    background-color: #8e8e93;
    color: #fff;
}

.badge-success {
    background-color: #34c759;
    color: #fff;
}

.badge-secondary {
    background-color: #8e8e93;
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.125rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--brand-primary-hover, #0b5ed7);
    color: #fff;
}

.btn-secondary {
    background-color: #8e8e93;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #636366;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #d1d1d6;
    color: #1d1d1f;
}
.btn-outline-secondary:hover {
    background-color: #f5f5f7;
}

.w-100 {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.alert-info {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    color: #01579b;
}

.alert-warning {
    background-color: #fff8e6;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.card-header {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e7;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e5e5e7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    background: #fafafa;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.65rem;
    align-items: start;
}

.session-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--list-rail-neutral, #d1d5db);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.session-card--completed,
.session-card--pending,
.session-card--reservation,
.session-card--other {
    border-left-color: var(--status-neutral, #9ca3af);
}

.session-card--active {
    border-left-color: var(--status-active, #16a34a);
    box-shadow: 0 0 0 1px var(--status-active-ring, rgba(22, 163, 74, 0.18));
}

.session-card--invalid {
    border-left-color: var(--status-invalid, #dc2626);
}

.session-card:hover,
.session-card:focus-within {
    border-color: #d1d1d6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.session-card--active:hover,
.session-card--active:focus-within {
    box-shadow:
        0 0 0 1px var(--status-active-ring, rgba(22, 163, 74, 0.22)),
        0 2px 12px rgba(22, 163, 74, 0.12);
}

.session-card-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.session-card-link:hover,
.session-card-link:focus,
.session-card-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.session-card-link:focus-visible {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--status-active, #16a34a) 45%, transparent);
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem 0.45rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.35rem;
    background: #fff;
}

.session-card--active .session-card-header {
    background: var(--status-active-soft, rgba(22, 163, 74, 0.08));
}

.session-card-body {
    padding: 0 0.75rem 0.65rem;
}

.session-card-title {
    min-width: 0;
    flex: 1;
}

.session-card-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    align-self: flex-start;
    min-height: 1.75rem;
}

/* Fixed slot so COMPLETED stays put with or without invoice */
.session-card-invoice-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
}

.session-card-invoice-slot .session-icon-btn {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
}

.session-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.session-icon-btn svg {
    display: block;
    flex-shrink: 0;
}

.session-icon-btn--invoice {
    background: #fff;
    color: var(--brand-primary, #0d6efd);
    border-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 30%, #d1d1d6);
}

.session-icon-btn--invoice:hover {
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 7%, #fff);
    color: var(--brand-primary, #0d6efd);
}

.session-card-location {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    word-break: break-word;
    color: #1c1c1e;
}

.session-card-loc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Match first text line height so pin aligns with label baseline/cap */
    height: 1.3em;
    margin-top: 0;
    color: var(--brand-primary, #0d6efd);
}

.session-card-loc-icon svg {
    display: block;
    width: 0.875rem;
    height: 0.875rem;
}

.session-card-loc-text {
    min-width: 0;
}

.session-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    margin-bottom: 0.45rem;
    line-height: 1.3;
    color: #6b7280;
}

.session-card-meta-icon {
    display: inline-flex;
    color: #9ca3af;
}

.session-card-stats {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.session-card-stats:has(> .session-stat-item:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.session-card-stats .session-stat-item {
    min-width: 0;
    padding: 0.4rem 0.45rem;
    border-radius: 0.55rem;
    background: #f4f5f7;
    border: 1px solid #ececf0;
}

.session-stat-energy .session-stat-icon,
.session-stat-max-power .session-stat-icon,
.session-stat-power .session-stat-icon,
.session-stat-price .session-stat-icon {
    color: color-mix(in srgb, var(--brand-primary, #0d6efd) 42%, #6b7280);
}

.session-stat-max-power,
.session-stat-power {
    text-align: left;
}

.session-card-stats dt {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 600;
    margin: 0 0 0.12rem 0;
}

.session-stat-icon {
    display: inline-flex;
    flex-shrink: 0;
}

.session-card-stats dd {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.25;
    color: #111827;
    font-weight: 600;
}

.session-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.28em 0.55em;
    border-radius: 999px;
    flex-shrink: 0;
    line-height: 1.2;
    border: 1px solid transparent;
}

/* Outline pills: neutral status ink — brand kept for CTAs/nav only */
.session-status--completed,
.session-status--pending,
.session-status--reservation,
.session-status--other {
    color: #4b5563;
    background: #fff;
    border-color: #d1d5db;
}

.session-status--active {
    color: #fff;
    background: var(--status-active, #16a34a);
    border-color: transparent;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-active, #16a34a) 45%, transparent);
    animation: session-status-pulse 1.8s ease-out infinite;
}

.session-status--invalid {
    color: #991b1b;
    background: #fff;
    border-color: #fecaca;
}

@keyframes session-status-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-active, #16a34a) 40%, transparent); }
    70% { box-shadow: 0 0 0 6px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

body.webapp-page-sessions .main {
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

body.webapp-page-sessions .session-page-actions {
    margin-bottom: 0.625rem;
}

/* Charge points list (card layout) */
.chargepoints-location-group {
    margin-bottom: 1.75rem;
}
.chargepoints-location-group:last-child {
    margin-bottom: 0;
}
.chargepoints-location-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin: 0 0 0.75rem 0;
    padding: 0 0 0 0.65rem;
    border-left: 3px solid var(--list-rail-neutral, #d1d5db);
}
.chargepoints-location-cards {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.chargepoints-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chargepoints-toolbar {
    margin-bottom: 0.75rem;
}

.chargepoints-search-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e8e8ed;
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    line-height: 1.25;
    color: #1d1d1f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chargepoints-search-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 45%, #e8e8ed);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #0d6efd) 14%, transparent);
}

.chargepoints-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.chargepoints-search-empty {
    margin-bottom: 0.75rem;
}
.chargepoint-card {
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chargepoint-card:hover {
    border-color: #d2d2d7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.chargepoint-card-favorite {
    background: #fff;
    border-color: #e8e8ed;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 3px 0 0 var(--list-rail-neutral, #d1d5db);
}
.chargepoint-card-favorite:hover {
    border-color: #d2d2d7;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.06),
        inset 3px 0 0 var(--list-rail-neutral, #d1d5db);
}
.favorite-btn {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    z-index: 3;
    transform: translateY(-50%);
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #c7c7cc;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    line-height: 0;
}
.favorite-btn:hover {
    color: var(--brand-primary, #0d6efd);
    background: #fff;
}
.favorite-btn:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}
.favorite-btn.favorite-btn-active {
    color: var(--brand-primary, #0d6efd);
}
.favorite-btn.favorite-btn-active:hover {
    color: #0a58ca;
}
.favorite-btn.favorite-btn-locked,
.favorite-btn.favorite-btn-locked:disabled {
    opacity: 1;
    cursor: not-allowed;
    color: var(--brand-primary, #0d6efd);
}
.favorite-btn.favorite-btn-locked:hover,
.favorite-btn.favorite-btn-locked:focus {
    color: var(--brand-primary, #0d6efd);
}
.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.favorite-btn.favorite-btn-locked:disabled {
    opacity: 1;
}
.chargepoint-card-link {
    display: block;
    position: relative;
    color: inherit;
    text-decoration: none;
    padding: 0.875rem 3.25rem 0.875rem 0.875rem;
    transition: background-color 0.15s;
}
.chargepoint-card-link:hover,
.chargepoint-card-link:focus {
    background-color: rgba(0, 0, 0, 0.015);
    color: inherit;
}
.chargepoint-card-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}
.chargepoint-status-icon {
    flex-shrink: 0;
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.1rem;
}
.chargepoint-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chargepoint-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.chargepoint-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    color: #1d1d1f;
    word-break: break-word;
}
.chargepoint-subtitle {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #86868b;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chargepoint-distance {
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 500;
    color: #6e6e73;
}
.chargepoint-availability-icon {
    display: block;
    object-fit: contain;
}
/* Shimmer status slots while OCPP live refresh is in flight (no banner). */
.chargepoint-card-ocpp-pending .chargepoint-status-icon {
    position: relative;
}
.chargepoint-card-ocpp-pending .chargepoint-availability-icon {
    opacity: 0;
}
.chargepoint-card-ocpp-pending .chargepoint-status-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.35rem;
    height: 1.6rem;
    transform: translate(-50%, -50%);
    border-radius: 0.35rem;
    background: linear-gradient(90deg, #e8ecf1 0%, #f4f6f8 45%, #e8ecf1 90%);
    background-size: 200% 100%;
    animation: cp-skel-shimmer 1.15s ease-in-out infinite;
}
.chargepoint-card-ocpp-pending .connector-badge {
    position: relative;
    overflow: hidden;
    min-width: 4.75rem;
    min-height: 1.45rem;
    color: transparent !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
}
.chargepoint-card-ocpp-pending .connector-badge > * {
    visibility: hidden;
}
.chargepoint-card-ocpp-pending .connector-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #e8ecf1 0%, #f4f6f8 45%, #e8ecf1 90%);
    background-size: 200% 100%;
    animation: cp-skel-shimmer 1.15s ease-in-out infinite;
}
@keyframes cp-skel-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
/* Instant-shell skeleton (catalogue still loading). */
.chargepoints-list--loading .chargepoints-skel-group {
    pointer-events: none;
}
.chargepoints-skel-heading {
    display: block;
    color: transparent;
    min-height: 0.95rem;
}
.chargepoints-skel-heading .cp-skel-bar--heading {
    display: block;
    width: min(11rem, 55%);
    height: 0.7rem;
    margin: 0;
}
.cp-skel-bar {
    display: block;
    border-radius: 0.4rem;
    background: linear-gradient(90deg, #e8ecf1 0%, #f4f6f8 45%, #e8ecf1 90%);
    background-size: 200% 100%;
    animation: cp-skel-shimmer 1.15s ease-in-out infinite;
}
.cp-skel-bar--md { height: 0.85rem; width: 68%; max-width: 12rem; }
.cp-skel-bar--sm { height: 0.65rem; width: 42%; max-width: 7.5rem; }
.cp-skel-bar--icon {
    width: 1.375rem;
    height: 1.625rem;
    border-radius: 0.35rem;
    flex-shrink: 0;
}
.chargepoint-card-skel {
    cursor: default;
}
.chargepoint-card-skel:hover {
    border-color: #e8e8ed;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
/* Match .chargepoint-card-link padding so skel icon/text line up with real cards. */
.chargepoint-card-skel-body {
    padding: 0.875rem 3.25rem 0.875rem 0.875rem;
}
.chargepoint-card-skel .chargepoint-title-block {
    gap: 0.4rem;
}
.chargepoint-chevron {
    position: absolute;
    right: 2.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #c7c7cc;
    transition: color 0.15s, transform 0.15s;
    pointer-events: none;
}
.chargepoint-card-link:hover .chargepoint-chevron,
.chargepoint-card-link:focus .chargepoint-chevron {
    color: var(--brand-primary);
    transform: translateY(-50%) translateX(2px);
}
.chargepoint-meta {
    font-size: 0.8125rem;
    color: #86868b;
    margin-bottom: 0.5rem;
}
.chargepoint-reservation-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #9a6700;
}
.chargepoint-card-reserved .chargepoint-reservation-hint:not(.d-none) {
    display: block;
}
.chargepoint-connectors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.chargepoint-connectors .connector-badge {
    font-size: 0.75rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    max-width: 100%;
}
.chargepoint-connectors .connector-badge .connector-icon {
    width: 14px;
    height: 14px;
}
.chargepoint-connectors .connector-badge .connector-status-text {
    font-size: 0.6875rem;
}
.connector-label {
    font-weight: 500;
}

/* Map page — fill the WebView below the header (avoid 100dvh: in iOS
   Capacitor WKWebView it can exceed the visible viewport and Google Maps
   paints gray / blanks after the first frame). */
html {
    height: 100%;
}

body.webapp-page-map {
    --map-qr-bottom: clamp(1.5rem, 6dvh, 3.5rem);
    --map-qr-pad-y: clamp(0.65rem, 1.8dvh, 0.85rem);
    --map-qr-pad-x: clamp(1rem, 4.5vw, 1.35rem);
    --map-qr-font: clamp(0.8125rem, 2.8vw, 0.9375rem);
    --map-qr-side-gap: clamp(1.5rem, 6vw, 2rem);
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* Body already has padding-top: header-total-height (border-box). Subtracting
   the header again left a ~header-sized empty strip under the map (Android
   WebView / Blink resolves % height against the content box). */
body.webapp-page-map .main {
    padding: 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.map-page-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    /* Keep Leaflet panes (z-index 200–700) inside this context so QR stays on top. */
    isolation: isolate;
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e8e8ed;
    /* Stacking context so Leaflet panes do not cover QR / alerts. */
    z-index: 1;
    /* Do NOT put transform on #map — WKWebView blanks Google Maps tiles.
       Leaflet stacking lives on .leaflet-container below. */
}
#map .leaflet-container {
    width: 100%;
    height: 100%;
    z-index: 0;
}
#map.map-canvas--pending::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(12rem, 55%);
    height: 0.55rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, #d8dde5 0%, #eef1f5 45%, #d8dde5 90%);
    background-size: 200% 100%;
    animation: cp-skel-shimmer 1.15s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 0 0.55rem rgba(232, 236, 241, 0.85);
}

body.webapp-page-map #map {
    border-radius: 0;
}

/* Google Maps tile images must ignore global/bootstrap max-width rules */
#map img,
#map .gm-style img,
.gm-style img {
    max-width: none !important;
    max-height: none !important;
}

/* Native shell: no page pinch/double-tap zoom; map keeps Leaflet/Google gestures. */
html.cs-native-shell,
html.cs-native-shell body {
    touch-action: manipulation;
}
html.cs-native-shell #map,
html.cs-native-shell #map .leaflet-container,
html.cs-native-shell .gm-style {
    touch-action: pan-x pan-y pinch-zoom;
}

.map-disclaimer-notice {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 5001;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.35;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.map-geolocation-notice {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 5000;
    margin: 0;
    font-size: 0.8125rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.map-qr-scan-alert {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 5000;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.map-qr-btn {
    position: absolute;
    bottom: calc(var(--map-qr-bottom, 1.5rem) + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: inline-flex;
    align-items: center;
    gap: clamp(0.35rem, 1.5vw, 0.5rem);
    padding: var(--map-qr-pad-y, 0.75rem) var(--map-qr-pad-x, 1.35rem);
    border: none;
    border-radius: 999px;
    background: var(--brand-primary, #0d6efd);
    color: #fff;
    font-size: var(--map-qr-font, 0.9375rem);
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    white-space: nowrap;
    max-width: calc(100% - var(--map-qr-side-gap, 2rem));
}

.map-qr-btn:hover {
    filter: brightness(1.05);
}

.map-qr-btn:active {
    transform: translateX(-50%) scale(0.98);
}

body.map-cluster-sheet-open .map-qr-btn {
    visibility: hidden;
    pointer-events: none;
}

.map-cluster-sheet {
    --bs-offcanvas-height: min(62vh, 520px);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.map-cluster-sheet .offcanvas-header {
    padding: 0.85rem 1rem 0.5rem;
}

.map-cluster-sheet .offcanvas-body {
    padding: 0 0.5rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.map-cluster-sheet-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.65rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.map-cluster-sheet-item + .map-cluster-sheet-item {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
}

.map-cluster-sheet-item:hover,
.map-cluster-sheet-item:focus-visible {
    background: rgba(13, 110, 253, 0.06);
    outline: none;
}

.map-cluster-sheet-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 26px;
}

.map-cluster-sheet-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.map-cluster-sheet-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}

.map-cluster-sheet-sub {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.25;
    word-break: break-word;
}

.map-cluster-sheet-status {
    font-size: 0.75rem;
    font-weight: 600;
}

.map-cluster-sheet-status.is-online {
    color: #198754;
}

.map-cluster-sheet-status.is-offline {
    color: #dc3545;
}

.map-cluster-sheet-chevron {
    flex: 0 0 auto;
    color: #adb5bd;
}

.webapp-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 245, 247, 0.82);
    backdrop-filter: blur(3px);
}

.webapp-nav-overlay[hidden] {
    display: none !important;
}

.webapp-nav-overlay__panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.webapp-nav-overlay__panel .spinner-border {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 0.2em;
}

body.webapp-nav-loading {
    overflow: hidden;
}

/* Location / Start charging page */
.location-session-page {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.location-session-page .charging-report-host {
    margin-top: auto;
}
.location-header {
    margin-bottom: 1.5rem;
}
.location-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}
.location-address {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}
.location-home-summary {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.location-home-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.location-home-summary-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.35;
}
.location-home-summary-k {
    color: #86868b;
    font-weight: 500;
    min-width: 5.5rem;
}
.location-home-summary-v {
    color: #1d1d1f;
    font-weight: 600;
}
.location-home-summary-v.is-on {
    color: color-mix(in srgb, var(--brand-primary, #0d6efd) 72%, #1d1d1f);
}
.location-home-summary-v.is-off {
    color: #b45309;
}
.location-home-summary-v.is-idle {
    color: #3a3a3c;
    font-weight: 500;
}
.location-home-settings-link {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-primary, #0d6efd);
    text-decoration: none;
}
.location-home-settings-link:hover {
    text-decoration: underline;
}
.location-home-steps {
    margin: 1.25rem 0 0.25rem;
    padding: 1rem 1.1rem;
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 5%, #fff);
    border: 1px solid color-mix(in srgb, var(--brand-primary, #0d6efd) 18%, #e8e8ed);
    border-radius: 14px;
}
.location-home-steps-title {
    margin: 0 0 0.55rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1d1d1f;
}
.location-home-steps-list {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #3a3a3c;
}
.location-home-steps-list li::marker {
    font-weight: 700;
    color: var(--brand-primary, #0d6efd);
}
.connector-select-list--single {
    margin-top: 0;
}
.location-session-page--home .connector-select-list--single .connector-option {
    cursor: default;
}
.location-start-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.my-tariff-box {
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.my-tariff-compact-meta {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #86868b;
    margin-bottom: 0.65rem;
}
.my-tariff-compact-desc {
    font-size: 0.8125rem;
    color: #475569;
    margin: 0 0 0.65rem;
    line-height: 1.4;
}
.my-tariff-compact-rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.my-tariff-compact-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f8f9fb;
    border: 1px solid #eef0f4;
}
.my-tariff-compact-row--active {
    background: #fff;
    border-color: color-mix(in srgb, var(--status-active, #16a34a) 28%, #e8e8ed);
    box-shadow: inset 3px 0 0 var(--status-active, #16a34a);
}
.my-tariff-compact-when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.my-tariff-compact-when-text {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
}
.my-tariff-now-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-primary, #0d6efd);
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--brand-primary, #0d6efd) 22%, transparent);
}
.my-tariff-compact-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.my-tariff-price-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.my-tariff-compact-row--active .my-tariff-price-chip {
    border-color: color-mix(in srgb, var(--status-active, #16a34a) 18%, #e2e8f0);
}
.my-tariff-full-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.my-tariff-full-id {
    font-weight: 600;
    font-size: 0.9375rem;
}
.my-tariff-full-meta {
    font-size: 0.8125rem;
    color: #6c757d;
}
.my-tariff-full-desc {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}
.my-tariff-table-wrap {
    margin-bottom: 0.75rem;
}
.my-tariff-table {
    font-size: 0.8125rem;
    background: #fff;
}
.my-tariff-table th {
    font-weight: 600;
    white-space: nowrap;
}
.my-tariff-table td {
    vertical-align: top;
}
.my-tariff-row-active {
    background: rgba(13, 110, 253, 0.06);
}
.my-tariff-now-badge {
    font-size: 0.6875rem;
    vertical-align: middle;
}
.my-tariff-price-list {
    padding-left: 1.1rem;
    margin: 0;
}
.my-tariff-price-list li + li {
    margin-top: 0.25rem;
}
.my-tariff-limits {
    margin-bottom: 0.5rem;
}
.my-tariff-footnote {
    margin-top: 0.5rem;
    line-height: 1.4;
}
.my-tariff-json-link {
    font-size: 0.8125rem;
    text-decoration: none;
}
.my-tariff-json-link:hover {
    text-decoration: underline;
}
.my-tariff-json-pre {
    max-height: min(70vh, 32rem);
    overflow: auto;
    padding: 1rem;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    background: #212529;
    color: #f8f9fa;
    border-radius: 0 0 0.375rem 0.375rem;
}
.connector-select-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #212529;
    display: block;
}
.connector-select-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.connector-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    text-align: left;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    min-height: 56px;
}
.connector-option:hover {
    border-color: var(--brand-primary-soft-border, rgba(13, 110, 253, 0.4));
    background-color: var(--brand-primary-softer, rgba(13, 110, 253, 0.04));
}
.connector-option.selected {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary-soft, rgba(13, 110, 253, 0.08));
    box-shadow: 0 0 0 1px var(--brand-primary);
}
.connector-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}
.connector-option .connector-icon {
    object-fit: contain;
}
.connector-icon-placeholder {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}
.connector-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.connector-option-label {
    line-height: 1.3;
}
.connector-option-status {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}
.connector-option-power {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}
.btn-start-charging {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    min-height: 52px;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}
.btn-start-charging:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
#formStart.is-starting-charge .btn-start-charging.is-starting {
    opacity: 0.9;
    pointer-events: none;
}
.start-btn-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: start-btn-spin 0.75s linear infinite;
    flex-shrink: 0;
}
@keyframes start-btn-spin {
    to { transform: rotate(360deg); }
}
.driver-error-alert .driver-error-tech-link {
    font-size: inherit;
    vertical-align: baseline;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.driver-error-tech-pre {
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bs-light, #f8f9fa);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    color: var(--bs-body-color, #212529);
}
#btnStop.is-stopping,
.session-stop-btn.is-stopping {
    opacity: 0.85;
    pointer-events: none;
}
.session-stop-footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e9ecef;
}
.session-stop-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.2;
    border: none;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(180deg, #f06575 0%, #dc3545 52%, #c82333 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.session-stop-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.34);
    color: #fff;
}
.session-stop-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.26);
}
.session-stop-btn:disabled {
    opacity: 0.72;
}
.session-cost-free {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #146c43;
    background: rgba(25, 135, 84, 0.12);
    vertical-align: middle;
}
.session-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: stretch;
    margin: 0 0 1rem;
}
.session-page-actions--compact {
    margin-top: 0.5rem;
}
.session-page-actions__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.625rem;
    padding: 0.5rem 1.125rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.session-page-actions__btn--solo {
    display: inline-flex;
}
.session-page-actions__icon {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.85;
}
.session-page-actions__btn--back {
    background: #fff;
    color: #3a3a3c;
    border-color: #d1d1d6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.session-page-actions__btn--back:hover {
    background: #f5f5f7;
    border-color: #c7c7cc;
    color: #1d1d1f;
}
.session-page-actions__btn--primary {
    background: var(--brand-primary, #0d6efd);
    color: #fff;
    border-color: var(--brand-primary, #0d6efd);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--brand-primary, #0d6efd) 28%, transparent);
}
.session-page-actions__btn--primary:hover {
    filter: brightness(0.94);
    color: #fff;
}
.session-page-actions__btn--outline {
    background: #fff;
    color: var(--brand-primary, #0d6efd);
    border-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 35%, #d1d1d6);
}
.session-page-actions__btn--outline:hover {
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 8%, #fff);
    color: var(--brand-primary, #0d6efd);
}
.session-page-actions--card {
    margin: 0;
    width: 100%;
    gap: 0.4rem;
}
.session-page-actions--card .session-page-actions__btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.25rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.8125rem;
}
.session-page-actions--card.session-page-actions--single .session-page-actions__btn {
    flex: 1 1 100%;
}
.session-page-actions--icons {
    justify-content: flex-end;
}
.session-page-actions__btn--icon {
    flex: 0 0 auto !important;
    width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    border-radius: 10px;
}
.session-page-actions__btn--icon svg {
    display: block;
    flex-shrink: 0;
}
.session-card-footer {
    padding: 0.45rem 0.85rem 0.55rem;
    background: #fafafa;
    border-top: 1px solid #e9ecef;
}
.session-details-heading {
    font-size: 1.15rem;
    font-weight: 600;
}

.summary-kpis {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.summary-kpis--no-cost {
    /* same row layout; fewer cards just share the width */
}

.summary-kpi {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.65rem 0.55rem;
    margin-bottom: 0;
}

.summary-kpi-label {
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #868e96;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-kpi-value {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

@media (min-width: 420px) {
    .summary-kpi {
        padding: 0.75rem 0.9rem;
    }
    .summary-kpi-label {
        font-size: 0.625rem;
    }
    .summary-kpi-value {
        font-size: 1.125rem;
    }
}

.summary-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.summary-detail-table th {
    text-align: left;
    color: #868e96;
    font-weight: 600;
    width: 38%;
    padding: 0.4rem 0.5rem 0.4rem 0;
    vertical-align: top;
}

.summary-detail-table td {
    padding: 0.4rem 0;
}

.summary-power-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
    align-items: baseline;
}

.summary-power-samples-btn {
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    vertical-align: baseline;
}

.summary-power-samples-btn:hover {
    text-decoration: underline;
}

.session-meter-samples-dialog {
    margin: 0.75rem;
    width: auto;
    max-width: calc(100vw - 1.5rem);
}

.session-meter-samples-modal {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(28, 28, 30, 0.18);
}

.session-meter-samples-modal .modal-header {
    padding: 0.9rem 1rem 0.4rem;
    background: #fff;
}

.session-meter-samples-modal .modal-title {
    color: #1c1c1e;
    font-weight: 700;
    font-size: 1.05rem;
}

.session-meter-samples-sub {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.35;
}

.session-meter-samples-modal .modal-footer {
    padding: 0.55rem 1rem 0.9rem;
    background: #f7f9fc;
}

.session-meter-samples-close {
    background: #3a3a3c;
    border-color: #3a3a3c;
    color: #fff;
    border-radius: 8px;
    padding: 0.35rem 1rem;
}

.session-meter-samples-close:hover,
.session-meter-samples-close:focus {
    background: #1c1c1e;
    border-color: #1c1c1e;
    color: #fff;
}

.session-meter-samples-list {
    max-height: min(58vh, 400px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.session-meter-samples-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    min-width: 0;
    border-bottom: 1px solid #eef1f5;
}

.session-meter-samples-row:nth-child(even):not(.session-meter-samples-row--head) {
    background: #f8f9fb;
}

.session-meter-samples-row--head {
    position: sticky;
    top: 0;
    z-index: 1;
}

.session-meter-samples-cell {
    min-width: 0;
    padding: 0.42rem 0.5rem;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-meter-samples-row--head .session-meter-samples-cell {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
}

.session-meter-samples-cell--time {
    color: #4a5560;
    font-size: 0.8rem;
}

.session-meter-samples-row--head .session-meter-samples-cell--time {
    background: #eef2f7;
    color: #5b6570;
}

.session-meter-samples-cell--energy {
    text-align: right;
    font-weight: 600;
    color: #1c1c1e;
}

.session-meter-samples-row--head .session-meter-samples-cell--energy {
    background: #eef2f7;
    color: #5b6570;
}

.session-meter-samples-cell--power {
    text-align: right;
    font-weight: 600;
    color: #1c1c1e;
}

.session-meter-samples-row--head .session-meter-samples-cell--power {
    background: #eef2f7;
    color: #5b6570;
}


.session-details-card {
    margin-bottom: 0.75rem;
}

.session-details-card .card-body {
    padding: 0.75rem 0.9rem;
}

.session-details-card .card-header {
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
}

.session-report-chart {
    height: min(240px, 38vh);
    min-height: 160px;
    position: relative;
}

.session-report-chart--pie {
    height: min(260px, 42vh);
    min-height: 200px;
    max-width: 320px;
    margin: 0 auto;
}

.session-report-chart canvas {
    width: 100% !important;
}

.session-dist-legend__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    padding: 0.45rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
}

.session-dist-legend__row:first-child {
    border-top: 0;
    padding-top: 0;
}

.session-dist-legend__label {
    font-weight: 600;
    color: #1c1c1e;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.session-dist-legend__label::before {
    content: '';
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--dist-dot, var(--brand-primary, #2d6a4f));
    flex-shrink: 0;
}

.session-dist-legend__meta {
    font-size: 0.8125rem;
}

.session-metric-cell,
.session-header-power-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.session-metric-spinner {
    display: none;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid rgba(13, 110, 253, 0.22);
    border-top-color: var(--brand-primary, #0d6efd);
    border-radius: 50%;
    animation: start-btn-spin 0.75s linear infinite;
    flex-shrink: 0;
}
.session-metric-cell.is-waiting .session-metric-spinner,
.session-header-power-wrap.is-waiting .session-metric-spinner,
.session-live-stat.is-waiting .session-metric-spinner {
    display: inline-block;
}
.session-metric-cell.is-waiting .session-metric-value,
.session-header-power-wrap.is-waiting .session-metric-value,
.session-live-stat.is-waiting .session-metric-value {
    opacity: 0.65;
}

/* Active session — clean live metrics */
.session-live-card {
    overflow: hidden;
    border: 1px solid #e8e8ed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.session-live-card.is-charging-active {
    position: relative;
}
.session-live-card.is-charging-active::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--brand-primary, #0d6efd), transparent);
    background-size: 100% 200%;
    animation: session-live-charge-flow 2.4s linear infinite;
    opacity: 0.85;
    pointer-events: none;
}
@keyframes session-live-charge-flow {
    0% { background-position: 0 0; }
    100% { background-position: 0 200%; }
}
.session-live-card.is-charging-active .session-live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.session-live-card.is-charging-active .session-live-status .bi {
    font-size: 0.85em;
    line-height: 1;
}
.session-live-card.is-charging-active .session-live-status .bi-lightning-charge-fill {
    animation: session-live-bolt-pulse 1.15s ease-in-out infinite;
}
@keyframes session-live-bolt-pulse {
    0%, 100% { opacity: 0.7; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.12); }
}
.session-live-header {
    border-bottom: 1px solid #f0f0f5;
    padding: 0.65rem 0.85rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.session-live-header__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.session-live-header__anim {
    flex-shrink: 0;
    display: none;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
}
.session-live-card.is-charging-active .session-live-header__anim {
    display: grid;
}
.session-live-charge-anim {
    width: 2.35rem;
    height: 2.35rem;
    color: var(--brand-primary, #0d6efd);
    display: block;
}
.session-live-charge-anim__ring {
    transform-origin: 24px 24px;
    opacity: 0.35;
}
.session-live-charge-anim__ring--a {
    animation: session-live-ring-pulse 2.2s ease-out infinite;
}
.session-live-charge-anim__ring--b {
    animation: session-live-ring-pulse 2.2s ease-out infinite 0.55s;
    opacity: 0.55;
}
.session-live-charge-anim__plug {
    transform-origin: 24px 24px;
    animation: session-live-plug-pulse 1.8s ease-in-out infinite;
}
@keyframes session-live-ring-pulse {
    0% { transform: scale(0.72); opacity: 0.55; }
    70% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}
@keyframes session-live-plug-pulse {
    0%, 100% { opacity: 0.75; transform: translateY(1px) scale(0.96); }
    45% { opacity: 1; transform: translateY(0) scale(1.04); }
    65% { opacity: 0.9; transform: translateY(0) scale(1); }
}
.session-live-status {
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
}
.session-live-body {
    padding: 0.75rem 0.85rem 0.85rem;
    background: #fff;
}
.session-live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}
.session-live-grid--no-cost .session-live-stat:nth-child(3) {
    grid-column: 1 / -1;
}
.session-live-stat {
    min-width: 0;
    min-height: 5rem;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    background: #f8f9fb;
    border: 1px solid #eef0f4;
}
.session-live-stat__label {
    display: block;
    width: 100%;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #86868b;
    margin-bottom: 0;
    flex-shrink: 0;
    text-align: center;
}
.session-live-stat__value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.25rem;
    width: 100%;
    min-height: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1d1d1f;
    line-height: 1.2;
    text-align: center;
}
.session-live-stat__value--solo {
    display: flex;
    align-items: baseline;
    justify-content: center;
}
.session-live-stat__unit {
    font-size: 0.75rem;
    font-weight: 600;
    color: #86868b;
}
.session-live-credit-limit {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6e6e73;
    white-space: nowrap;
}
.session-live-duration {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.session-live-stat.is-waiting .session-metric-value {
    opacity: 0.65;
}
.session-live-stat .session-metric-value .text-muted,
.session-live-stat .session-metric-value .small {
    font-size: 0.7rem;
    font-weight: 600;
}
.session-live-stat .session-metric-live {
    justify-content: center;
}

/* Active session page — same canvas as other WebApp pages */
body.session-active-page .main {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--header-total-height));
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: #f5f5f7;
}
body.session-active-page .charging-report-host {
    margin-top: auto;
}
.session-active-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0.75rem;
}
.session-active-view__back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid #e5e5e7;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.session-active-view__back:hover {
    background: #fff;
    border-color: #d1d1d6;
    color: #000;
}
.session-active-view__hero {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 0.15rem 0.15rem;
}
.session-active-view__logo,
.session-active-view__logo-fallback {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--brand-primary, #0d6efd) 22%, transparent);
    flex-shrink: 0;
}
.session-active-view__logo-fallback {
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-primary, #0d6efd);
}
.session-active-view__brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #1d1d1f;
}
.session-active-view__tagline {
    margin-top: 0.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary, #0d6efd);
}
.session-active-view .session-live-card--branded {
    border: 1px solid color-mix(in srgb, var(--brand-primary, #0d6efd) 22%, #e8e8ed);
    border-radius: 18px;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-primary, #0d6efd) 14%, rgba(0, 0, 0, 0.06));
    background: #fff;
}
.session-active-view .session-live-card--branded .session-live-header {
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand-primary, #0d6efd) 12%, #fff), #fff 70%);
    border-bottom-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 12%, #f0f0f5);
}
.session-active-view .session-live-card--branded .session-live-status.bg-success {
    background: var(--brand-primary, #0d6efd) !important;
}
.session-active-view .session-live-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
}
.session-active-view .session-live-grid--no-cost .session-live-stat:nth-child(3) {
    grid-column: auto;
}
.session-active-view .session-live-stat {
    min-height: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 5%, #f8f9fb);
    border-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 12%, #eef0f4);
}
.session-active-view .session-live-stat__label {
    margin-bottom: 0.1rem;
    width: 100%;
    text-align: center;
}
.session-active-view .session-live-stat__value,
.session-active-view .session-live-stat__value--solo {
    justify-content: center;
    align-items: baseline;
    width: 100%;
    text-align: center;
    font-size: 1.25rem;
}
.session-active-view .session-live-stat:nth-child(1) .session-live-stat__value,
.session-active-view .session-live-stat:nth-child(1) .session-metric-value {
    color: var(--brand-primary, #0d6efd);
}
.session-active-view .session-live-stat:nth-child(2) .session-live-stat__value,
.session-active-view .session-live-stat:nth-child(2) .session-metric-value {
    color: #c45a3d;
}
.session-active-view .session-live-stat .session-metric-live {
    justify-content: center;
}
.session-active-view .session-stop-footer {
    border-top-color: color-mix(in srgb, var(--brand-primary, #0d6efd) 10%, #e9ecef);
}

.start-result {
    margin-top: 0.25rem;
}
.start-result .alert a {
    font-weight: 600;
    text-decoration: underline;
}

/* Utilities */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: #86868b; }
.small { font-size: 0.8125rem; }
.d-block { display: block; }
.mb-0 { margin-bottom: 0; }

/* Forms: mobile-friendly inputs */
.main input[type="text"],
.main input[type="email"],
.main input[type="password"],
.main input[type="tel"],
.main select,
.main textarea {
    max-width: 100%;
    font-size: 16px; /* avoids zoom on focus on iOS */
}
@media (max-width: 768px) {
    .main input[type="text"],
    .main input[type="email"],
    .main input[type="password"],
    .main input[type="tel"],
    .main select,
    .main textarea {
        min-height: 44px;
        width: 100%;
    }
}

/* Mobile: ensure touch targets and no horizontal overflow */
@media (max-width: 768px) {
    :root {
        /* Android / Xamarin WebView often reports safe-area=0 */
        --webview-safe-top: max(32px, env(safe-area-inset-top, 0px));
        --header-total-height: calc(var(--header-height) + var(--webview-safe-top));
    }
    .main { padding: 1rem 0.75rem; }
    body.webapp-page-map .main {
        padding: 0;
    }
    body.webapp-page-sessions .main {
        padding: 0.625rem 0.625rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
    }
    .sessions-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .table-responsive { border-radius: 8px; margin: 0 -0.25rem; }
    .table thead th,
    .table tbody td { padding: 0.75rem 0.5rem; font-size: 0.875rem; }
    .btn, .menu-item { min-height: 44px; }
    .chargepoints-location-cards {
        gap: 0.5rem;
    }
    .chargepoint-card-link {
        padding: 0.8rem 3rem 0.8rem 0.75rem;
    }
    .connector-option { min-height: 56px; padding: 1rem; }
    .btn-start-charging { min-height: 52px; }
}

/* Charging report: discrete text-style trigger + modal (above sidebar overlay) */
.charging-report-host {
    margin-top: auto;
    padding-top: 1.25rem;
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
}
.charging-report-trigger {
    text-align: center;
}
.charging-report-open {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--brand-primary, #0d6efd);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.charging-report-open:hover {
    color: var(--brand-primary-hover, #0b5ed7);
    text-decoration: underline;
    opacity: 0.9;
}
.charging-report-open:focus {
    outline: none;
}
.charging-report-open:focus-visible {
    outline: 2px solid var(--brand-primary, #0d6efd);
    outline-offset: 3px;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .charging-report-open {
        display: inline-block;
        min-height: 40px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
        line-height: 1.4;
    }
}
.charging-report-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}
.charging-report-modal.is-open {
    display: flex;
}
@media (min-width: 540px) {
    .charging-report-modal {
        align-items: center;
        padding: 1rem;
    }
}
.charging-report-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.charging-report-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: min(88vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.15rem 1.25rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}
@media (min-width: 540px) {
    .charging-report-modal__dialog {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    }
}
.charging-report-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.charging-report-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    padding-right: 0.25rem;
}
.charging-report-modal__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    margin: -0.35rem -0.35rem 0 0;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.charging-report-modal__close:hover {
    background: #f1f3f5;
    color: #212529;
}
.charging-report-modal__intro {
    line-height: 1.45;
}
/* Stack labels above controls (Bootstrap handles this; reinforces if utilities missing) */
.charging-report-modal__dialog .charging-report-form .form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.charging-report-modal__dialog .charging-report-form .form-control,
.charging-report-modal__dialog .charging-report-form .form-select {
    width: 100%;
}
.charging-report-modal .charging-report-message .alert {
    margin-bottom: 0;
}

/* AdHoc deposit — required fields (busy uses in-page loading step / button spinner, not cursor) */
body.webapp-adhoc-deposit .adhoc-required-mark {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
    color: #842029;
    background: rgba(220, 53, 69, 0.12);
}
body.webapp-adhoc-deposit .adhoc-field-required .form-label {
    font-weight: 600;
}
body.webapp-adhoc-deposit .adhoc-field-required .form-control,
body.webapp-adhoc-deposit .adhoc-field-required .form-select {
    border-color: rgba(220, 53, 69, 0.35);
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.08);
}
body.webapp-adhoc-deposit .adhoc-field-required .form-control:focus,
body.webapp-adhoc-deposit .adhoc-field-required .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
}
body.webapp-adhoc-deposit .adhoc-field-required.is-invalid .form-control,
body.webapp-adhoc-deposit .adhoc-field-required.is-invalid .form-select,
body.webapp-adhoc-deposit .form-control.is-invalid,
body.webapp-adhoc-deposit .form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.18);
}
body.webapp-adhoc-deposit #adhoc-amounts.is-invalid,
body.webapp-adhoc-deposit #adhoc-methods.is-invalid,
body.webapp-adhoc-deposit #adhoc-connector-panel.is-invalid {
    outline: 2px solid rgba(220, 53, 69, 0.55);
    outline-offset: 3px;
    border-radius: 0.5rem;
}
body.webapp-adhoc-deposit .adhoc-busy-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 0.4rem;
    vertical-align: -0.125em;
}

/* Driver charging reports */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.report-card .card-body {
    padding: 1rem 1.1rem;
}
.report-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.report-card-title-block {
    min-width: 0;
}
.report-card-id {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
}
.report-card-title {
    font-weight: 600;
    word-break: break-word;
}
.report-card-meta {
    margin-top: 0.35rem;
}
.report-card-description {
    margin-top: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.report-card-reply {
    margin-top: 0.9rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(25, 135, 84, 0.08);
    border: 1px solid rgba(25, 135, 84, 0.2);
}
.report-card-reply--empty {
    background: rgba(108, 117, 125, 0.08);
    border-color: rgba(108, 117, 125, 0.2);
}
.report-card-reply-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #198754;
    margin-bottom: 0.35rem;
}
.report-card-reply--empty .report-card-reply-label {
    color: #6c757d;
}
.report-card-reply-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* —— Home chargers (APP_FEATURE_HOME) —— */
.home-page .home-card {
    border: 1px solid var(--brand-primary-soft-border, rgba(13, 110, 253, 0.28));
    box-shadow: 0 2px 10px color-mix(in srgb, var(--brand-primary, #0d6efd) 10%, transparent);
}

.home-page .home-card > .card-header {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--brand-primary, #0d6efd) 14%, #fff) 0%,
        color-mix(in srgb, var(--brand-primary, #0d6efd) 6%, #fff) 100%
    );
    border-bottom: 1px solid var(--brand-primary-soft-border, rgba(13, 110, 253, 0.28));
    color: color-mix(in srgb, var(--brand-primary, #0d6efd) 55%, #1c1c1e);
}

.home-page .home-card > .card-header h2 {
    color: var(--brand-primary, #0d6efd);
    font-weight: 700;
    font-size: 1.05rem;
}

.home-page .home-empty {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: var(--brand-primary-soft, rgba(13, 110, 253, 0.08));
    border: 1px dashed var(--brand-primary-soft-border, rgba(13, 110, 253, 0.4));
    color: #3a3a3c;
    margin: 0;
}

.home-page .home-empty-mark {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--brand-primary, #0d6efd);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.home-page .home-empty strong {
    display: block;
    color: var(--brand-primary, #0d6efd);
    margin-bottom: 0.2rem;
}

.home-page .home-charger-tile {
    border: 1px solid var(--brand-primary-soft-border, rgba(13, 110, 253, 0.28));
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.85rem;
    background: color-mix(in srgb, var(--brand-primary, #0d6efd) 4%, #fff);
}

.home-page .home-charger-tile:last-child {
    margin-bottom: 0;
}

.home-page .home-charger-id {
    color: var(--brand-primary, #0d6efd);
    font-weight: 700;
}

.home-page .home-start-app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.home-page .home-schedule-intro {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.home-page .home-field-hint {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.home-page .home-schedule-status {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

.home-page .home-schedule-status.is-idle {
    color: #6c757d;
}

.home-page .home-schedule-status.is-on {
    color: color-mix(in srgb, var(--brand-primary, #0d6efd) 85%, #198754);
}

.home-page .home-schedule-status.is-off {
    color: #b45309;
}

.home-page .home-schedule-window-fields.is-disabled {
    opacity: 0.55;
}

.home-page .form-control:focus,
.home-page .form-select:focus {
    border-color: var(--brand-primary, #0d6efd);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft, rgba(13, 110, 253, 0.2));
}

.home-page .form-check-input:checked {
    background-color: var(--brand-primary, #0d6efd);
    border-color: var(--brand-primary, #0d6efd);
}

.home-page .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft, rgba(13, 110, 253, 0.2));
    border-color: var(--brand-primary, #0d6efd);
}

.home-page .btn-primary {
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}

.home-page .home-energy-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    padding: 0.3rem;
    border-radius: 12px;
    background: #f2f2f4;
    border: 1px solid #e5e5ea;
}

.home-page .home-energy-price::placeholder {
    color: #b0b0b5;
    opacity: 1;
}

.home-page .home-energy-price::-webkit-input-placeholder {
    color: #b0b0b5;
    opacity: 1;
}

.home-page .home-energy-price::-moz-placeholder {
    color: #b0b0b5;
    opacity: 1;
}

.home-page .home-energy-mode .btn-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.home-page .home-energy-mode-btn {
    margin: 0;
    padding: 0.65rem 0.5rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #3a3a3c;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.home-page .home-energy-mode .btn-check:checked + .home-energy-mode-btn {
    background: #fff;
    color: var(--brand-primary, #2d6a4f);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.home-page .home-energy-mode .btn-check:focus-visible + .home-energy-mode-btn {
    outline: 2px solid var(--brand-primary, #2d6a4f);
    outline-offset: 1px;
}

.home-page .home-claim-help {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #f3f4f6;
    border-left: 3px solid var(--list-rail-neutral, #d1d5db);
    color: #3a3a3c;
}

/* MB WAY phone hint — clearly a placeholder, not a pre-filled number */
#mbway-phone::placeholder,
#adhoc-mbway-phone::placeholder {
    color: #b0b0b5;
    opacity: 1;
}
#mbway-phone::-webkit-input-placeholder,
#adhoc-mbway-phone::-webkit-input-placeholder {
    color: #b0b0b5;
    opacity: 1;
}
#mbway-phone::-moz-placeholder,
#adhoc-mbway-phone::-moz-placeholder {
    color: #b0b0b5;
    opacity: 1;
}

