/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 3.5rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* =============================================
   APP LAYOUT – matching green mockup
   ============================================= */

.app-drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(900px 260px at 20% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.00) 60%),
        linear-gradient(180deg, #2D5A3D 0%, #245035 100%);
}

.app-logo-area {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-logo-title {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
}

.app-nav-links {
    flex: 1;
    padding: 12px 8px;
}

.app-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

.app-nav-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.app-nav-item:hover {
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    transform: translateX(1px);
}

.app-nav-item.active {
    background: linear-gradient(90deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.10) 100%);
    color: #ffffff;
    font-weight: 600;
}

.app-nav-item.active::before {
    opacity: 1;
    background: linear-gradient(180deg, #A5D6A7 0%, #4CAF50 100%);
}

.app-nav-item .nav-label {
    font-size: 0.875rem;
}

.app-user-area {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-user-name {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================
   DASHBOARD
   ============================================= */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-greeting {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(90deg, #1a3d28 0%, #2D5A3D 60%, #3a7a50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    line-height: 1.2;
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dashboard-search {
    flex: 1;
    min-width: 220px;
    max-width: 400px;
}

.dashboard-tabs .mud-tab {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Audit list grid */
.audit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

/* Audit card */
.audit-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcfa 100%);
    border-radius: 12px;
    border: 1px solid #e8ede9;
    padding: 16px 20px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    position: relative;
}

.audit-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    border-radius: 12px 0 0 12px;
    transition: background 0.2s ease;
}

.audit-card:hover {
    box-shadow: 0 6px 24px rgba(45,90,61,0.12);
    border-color: #c0d8c0;
    transform: translateY(-1px);
}

.audit-card:hover::before {
    background: linear-gradient(180deg, #2D5A3D 0%, #4CAF50 100%);
}

.audit-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.audit-card-info {
    flex: 1;
    min-width: 0;
}

.audit-address {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-city {
    font-weight: 400;
    color: #888;
}

.audit-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

.audit-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.audit-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 38px;
    color: #444;
}

.audit-progress-bar {
    flex: 1;
}

.audit-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.desktop-actions {
    display: none;
    gap: 8px;
    align-items: center;
}

.mobile-menu-btn {
    display: inline-flex;
}

@media (min-width: 768px) {
    .desktop-actions {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Status badges (replaces MudChip) */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge-draft {
    background-color: #f0f0f0;
    color: #666;
}

.status-badge-inprogress {
    background-color: #fff0e0;
    color: #bf360c;
}

.status-badge-ready {
    background-color: #2D5A3D;
    color: #ffffff;
}

.status-badge {
    gap: 4px;
}

/* =============================================
   OFFLINE BANNER
   ============================================= */

.wizard-offline-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #92400e;
    color: #fef3c7;
    padding: 5px 14px;
    font-size: .79rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* =============================================
   AUDIT WIZARD
   ============================================= */

.audit-wizard {
    display: flex;
    flex-direction: row;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    height: calc(100vh - 80px);
}

.wizard-sidebar {
    width: 260px;
    min-width: 260px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e8ede9;
}

.wizard-sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid #eef3ef;
    background: #f7f8fa;
}

.wizard-sidebar-title {
    color: #66706a !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wizard-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-text {
    color: #1a1a1a !important;
    font-weight: 600;
}

.remaining-text {
    color: #66706a !important;
}

.wizard-progress-bar {
    height: 4px !important;
}

.wizard-progress-bar .mud-progress-linear-bar-1,
.wizard-progress-bar .mud-progress-linear-bar-2 {
    background-color: #2D5A3D !important;
}

.wizard-progress-bar .mud-progress-linear-background {
    background-color: #e8ede9 !important;
}

.wizard-steps-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.wizard-steps-list::-webkit-scrollbar {
    width: 4px;
}

.wizard-steps-list::-webkit-scrollbar-track {
    background: transparent;
}

.wizard-steps-list::-webkit-scrollbar-thumb {
    background: #c8d8c8;
    border-radius: 2px;
}

.wizard-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: #2f3a34;
    margin: 0 8px 2px;
    transition: background-color 0.15s ease;
}

.wizard-step-item:hover {
    background: #eef1ef;
}

.wizard-step-item.active {
    background: rgba(45,90,61,0.05);
    border-left: 3px solid #2D5A3D;
    padding-left: 13px;
}

.wizard-step-item .step-label {
    font-size: 0.875rem !important;
    color: #2f3a34;
}

.wizard-step-item.active .step-label {
    color: #1A3D28;
    font-weight: 600;
}

.step-indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cfd8d2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #6b7a71;
    font-weight: 600;
}

.wizard-step-item.active .step-indicator {
    background: #2D5A3D;
    border-color: #2D5A3D;
    color: #ffffff;
}

.wizard-step-item.completed .step-indicator {
    background: #e8f5e9;
    border-color: rgba(45,90,61,0.22);
    color: #2D5A3D;
}

.step-check-icon {
    color: #2D5A3D !important;
    font-size: 18px !important;
}

/* Step with missing required fields — orange right border */
.wizard-step-item.has-missing {
    border-right: 3px solid #ff9800;
    background: rgba(255, 152, 0, 0.035);
}

.wizard-step-item.active.has-missing {
    border-right: 3px solid #ff9800;
}

/* Wizard main column (wraps mobile topbar + content) */
.wizard-main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Wizard content area */
.wizard-content {
    flex: 1;
    background: linear-gradient(160deg, #f6f9f6 0%, #f0f5f1 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =============================================
   WIZARD TOP BAR (replaces sidebar)
   ============================================= */

.wizard-top-bar {
    display: none;
    background: linear-gradient(90deg, #1e4a2e 0%, #2D5A3D 100%);
    color: #fff;
    padding: 12px 20px;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.wizard-back-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    padding: 4px 0;
    white-space: nowrap;
    opacity: 0.9;
}

.wizard-back-btn:hover { opacity: 1; }
.wizard-back-btn:disabled { opacity: 0.4; cursor: default; }

.wizard-top-step-name {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.wizard-progress-subbar {
    display: none;
    background: #f5f7f5;
    border-bottom: 1px solid #e8ede9;
    padding: 8px 20px;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.wizard-progress-count {
    font-size: 0.8rem;
    color: #66706a;
    font-weight: 500;
}

.wizard-content-header {
    background: linear-gradient(90deg, #ffffff 0%, #fafcfa 100%);
    border-bottom: 1px solid #e4ede4;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 1px 6px rgba(45,90,61,0.05);
}

.wizard-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wizard-step-title {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number-badge {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2D5A3D;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.wizard-step-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.wizard-step-content::-webkit-scrollbar {
    width: 6px;
}

.wizard-step-content::-webkit-scrollbar-track {
    background: transparent;
}

.wizard-step-content::-webkit-scrollbar-thumb {
    background: #c8d8c8;
    border-radius: 3px;
}

.wizard-nav-footer {
    background: linear-gradient(90deg, #ffffff 0%, #fafcfa 100%);
    border-top: 1px solid #e4ede4;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 -1px 6px rgba(45,90,61,0.05);
}

.nav-btn {
    min-width: 120px;
}

/* =============================================
   SAVE STATUS BAR
   ============================================= */

.table-scroll {
    overflow-x: auto;
}

.responsive-cards {
    display: none;
}

@media (max-width: 768px) {
    .table-scroll .mud-table {
        min-width: 720px;
    }

    .responsive-table {
        display: none;
    }

    .responsive-cards {
        display: block;
    }
}

.save-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.save-status--saving {
    background: #fff3e0;
    color: #e65100;
}

.save-status--saved {
    background: #e8f5e9;
    color: #2D5A3D;
}

.save-status--autosaved {
    background: #e3f2fd;
    color: #1565c0;
}

.save-status--error {
    background: #fce4ec;
    color: #c62828;
}

.save-spinner {
    width: 14px !important;
    height: 14px !important;
}

/* =============================================
   CHECKLIST (Summary Step)
   ============================================= */

.audit-checklist {
    background: #ffffff;
    border: 1px solid #e8ede9;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.checklist-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f4f0;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item-ok {
    color: #2D5A3D;
}

.checklist-item-warn {
    color: #e65100;
}

.checklist-item-label {
    font-size: 0.875rem;
    color: #333;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    /* Wizard: switch to full-width mobile layout */
    .audit-wizard {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 56px);
        border-radius: 0;
        box-shadow: none;
        margin: -16px;
    }

    .wizard-sidebar {
        display: none;
    }

    .wizard-top-bar {
        display: flex;
    }

    .wizard-progress-subbar {
        display: flex;
    }

    .wizard-content {
        overflow-y: auto;
        flex: 1;
    }

    .wizard-step-content {
        padding: 10px 12px;
        overflow-y: unset;
        flex: unset;
    }

    .wizard-nav-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 20;
        padding: 8px 12px;
        background: #fff;
        box-shadow: 0 -2px 8px rgba(0,0,0,.12);
    }

    .wizard-step-content {
        padding-bottom: 72px;
    }

    .wizard-missing-panel {
        display: none;
    }

    .dashboard-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-search {
        max-width: 100%;
    }
}

/* =============================================
   ENERGY DASHBOARD REDESIGN
   ============================================= */

.energy-dashboard-topbar { display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.energy-dashboard-title { font-size:1.5rem; font-weight:700; color:#1a3d28; flex:1; }
.module-cards-strip { display:flex; gap:16px; margin-bottom:24px; overflow-x:auto; }
.module-card { background:#fff; border-radius:12px; border:1px solid #e8ede9; padding:16px 20px; min-width:220px; flex-shrink:0; cursor:pointer; transition:box-shadow .2s,transform .15s; }
.module-card:hover { box-shadow:0 6px 24px rgba(45,90,61,.12); transform:translateY(-2px); }
.module-card-title { font-size:.875rem; font-weight:600; color:#1a1a1a; margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.energy-dashboard-grid { display:grid; grid-template-columns:1fr 320px; gap:20px; align-items:start; }
.dashboard-widget { background:#fff; border-radius:14px; border:1px solid #e8ede9; padding:20px; box-shadow:0 2px 12px rgba(45,90,61,.06); }
.dashboard-widget-title { font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#66706a; margin-bottom:16px; }
.current-audit-name { font-size:1.25rem; font-weight:700; color:#1a3d28; margin-bottom:4px; }
.current-audit-step { font-size:.875rem; color:#66706a; margin-bottom:16px; }
.current-audit-tasks { font-size:.8rem; color:#444; margin-bottom:6px; }
.quick-action-btn { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#f5f7f5; border-radius:10px; border:1px solid #e8ede9; cursor:pointer; font-size:.875rem; font-weight:500; color:#1a3d28; text-decoration:none; transition:background .15s,border-color .15s; margin-top:10px; }
.quick-action-btn:hover { background:#eef3ef; border-color:#c0d8c0; }
.todo-item { display:flex; align-items:flex-start; gap:10px; padding:8px 0; border-bottom:1px solid #f0f4f0; font-size:.875rem; color:#333; }
.todo-item:last-child { border-bottom:none; }
.todo-dot { width:8px; height:8px; border-radius:50%; background:#2D5A3D; margin-top:5px; flex-shrink:0; }
.activity-item { display:flex; align-items:flex-start; gap:10px; padding:8px 0; border-bottom:1px solid #f0f4f0; font-size:.8rem; color:#555; }
.activity-item:last-child { border-bottom:none; }
.activity-plus { color:#4CAF50; font-weight:700; font-size:1rem; flex-shrink:0; }
.activity-time { font-size:.7rem; color:#999; margin-top:2px; }
@media (max-width:900px) { .energy-dashboard-grid { grid-template-columns:1fr; } }

/* =============================================
   FAB (Floating Action Button) - Mobile Only
   ============================================= */

.fab-button {
    display: none; /* Hidden by default (desktop) */
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4), 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
    align-items: center;
    justify-content: center;
}

.fab-button:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5), 0 12px 32px rgba(0, 0, 0, 0.2);
}

.fab-button:active:not(:disabled) {
    transform: scale(0.95);
}

.fab-button:disabled {
    background: #9E9E9E;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fab-button .mud-icon-root {
    font-size: 32px;
}

@media (max-width: 768px) {
    .fab-button {
        display: flex;
    }
    
    .desktop-new-audit-btn {
        display: none !important;
    }
    
    /* Hide module card strip on mobile */
    .module-cards-strip {
        display: none !important;
    }
    
    /* Hide recent changes and activities widgets on mobile */
    .dashboard-widget:has(.activity-item) {
        display: none !important;
    }
    
    /* Make current audit widget full width on mobile */
    .energy-dashboard-grid > div:first-child {
        grid-column: 1 / -1;
    }
    
    /* Show progress circle only on mobile */
    .mobile-progress-circle {
        display: flex;
    }
}

/* Hide progress circle on desktop */
.mobile-progress-circle {
    display: none;
}

/* =============================================
   BUTTON SELECT COMPONENT
   ============================================= */

.button-select {
    width: 100%;
}

.button-select-label {
    color: rgba(0, 0, 0, 0.6);
    font-weight: 400;
    font-size: 0.75rem;
    margin-bottom: 8px;
    display: block;
}

.button-select-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.button-select-option {
    text-transform: none;
    font-weight: 500;
    border-radius: 8px;
}

.button-select-option.mud-button-filled {
    box-shadow: 0 2px 4px rgba(45, 90, 61, 0.15);
}

/* =============================================
   QUICK-FILL CHIPS
   ============================================= */

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.quick-chip {
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid #c8d8c8;
    background: #f5f9f5;
    color: #2f4a35;
    font-size: .72rem;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
    line-height: 1.6;
}

.quick-chip:hover {
    background: #e0f0e4;
    border-color: #2D5A3D;
    color: #1a3d28;
}

.quick-chip.active {
    background: #d4edda;
    border-color: #2D5A3D;
    color: #1a3d28;
    font-weight: 600;
}

.quick-chip-other {
    border-style: dashed;
    color: #6b7a71;
}

.quick-chip-other:hover {
    border-style: solid;
}

.quick-chip-other.active {
    background: #f0f4f1;
    border-style: solid;
    border-color: #2D5A3D;
    color: #2D5A3D;
    font-weight: 600;
}

.chip-select-field {
    display: flex;
    flex-direction: column;
}

/* =============================================
   STEP CONTENT HEADER
   ============================================= */

.step-content-header {
    font-weight: 700;
    border-bottom: 1px solid #e4ede4;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

/* =============================================
   TAK/NIE TOGGLE BUTTONS
   ============================================= */

.toggle-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toggle-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1.5px solid #cfd8d2;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}

.toggle-btn.active-yes {
    background: #e8f5e9;
    border-color: #2D5A3D;
    color: #1a3d28;
}

.toggle-btn.active-no {
    background: #fff3e0;
    border-color: #e65100;
    color: #bf360c;
}

.toggle-btn.active-nd {
    background: #eceff1;
    border-color: #78909c;
    color: #37474f;
}

/* =============================================
   MISSING FIELD HIGHLIGHT
   ============================================= */

[data-missing="true"] .mud-input-outlined fieldset,
[data-missing="true"] fieldset {
    border-color: #e53935 !important;
    border-width: 2px !important;
}

@keyframes field-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(229,57,53,.25); }
}

.field-flash {
    animation: field-flash 1.5s ease;
}

/* =============================================
   WIZARD MINI DASHBOARD (desktop right panel)
   ============================================= */

.wizard-mini-dashboard {
    width: 240px;
    min-width: 240px;
    background: #f7f8fa;
    border-left: 1px solid #e8ede9;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 16px;
}

.mini-dash-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #66706a;
    margin-bottom: 16px;
}

.mini-dash-section {
    padding: 12px 0;
    border-bottom: 1px solid #eef3ef;
}

.mini-dash-counter {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a3d28;
}

.mini-dash-counter.counter-warn {
    color: #e65100;
}

.mini-dash-counter.counter-ok {
    color: #2D5A3D;
}

.mini-dash-nonconformity-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.mini-dash-nok-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-dash-nok-label {
    flex: 1;
    color: #444;
}

.mini-dash-nok-count {
    font-weight: 700;
    color: #1a1a1a;
}

.mini-dash-label {
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #66706a;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .wizard-mini-dashboard {
        display: none;
    }
}

/* =============================================
   AUDIT CARD – LEFT BORDER BY STATUS
   ============================================= */

.audit-card[data-status="Draft"]::before {
    background: #bbb;
    opacity: 1;
}

.audit-card[data-status="InProgress"]::before {
    background: #e65100;
    opacity: 1;
}

.audit-card[data-status="Ready"]::before {
    background: #2D5A3D;
    opacity: 1;
}

/* =============================================
   WIZARD MISSING PANEL
   ============================================= */

.wizard-missing-panel {
    background: #fff8f8;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: .875rem;
}

.wizard-missing-panel-title {
    font-weight: 600;
    color: #c62828;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.missing-item-text {
    color: #c62828;
    font-size: .85rem;
    display: block;
    padding: 2px 0;
}

.checklist-subitem {
    padding: 3px 0 3px 28px;
    border-bottom: 1px solid #f8f0f0;
}

.checklist-subitem:last-child {
    border-bottom: 1px solid #f0f4f0;
    margin-bottom: 2px;
}

.checklist-nav-btn {
    background: none;
    border: none;
    color: #c62828;
    text-decoration: underline;
    cursor: pointer;
    font-size: .8rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-align: left;
}

.checklist-nav-btn:hover {
    color: #b71c1c;
}

.step-missing-badge {
    background: #e53935;
    color: #fff;
    border-radius: 10px;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
}

/* =============================================
   WIZARD MOBILE STEPS BAR
   ============================================= */

.wizard-mobile-steps-bar {
    display: none;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid #e0e8e2;
    flex-shrink: 0;
}

.mobile-steps-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 12px 0;
    gap: 0;
    scrollbar-width: none;
}

.mobile-steps-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 8px 8px;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 56px;
    position: relative;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.mobile-step-item::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -4px;
    width: 8px;
    height: 1px;
    background: #cdd8d0;
}

.mobile-step-item:last-child::after {
    display: none;
}

.mobile-step-item:hover {
    opacity: 0.85;
}

.mobile-step-item.active {
    opacity: 1;
}

.mobile-step-item.completed {
    opacity: 0.85;
}

.mobile-step-item.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.mobile-step-item.has-missing .mobile-step-circle {
    border-color: #ff9800;
    border-width: 2px;
}

/* Nonconformity status chips — compact on mobile */
@media (max-width: 600px) {
    .nonconformity-chips-row .mud-chip {
        font-size: 0.7rem !important;
        height: 24px !important;
        padding: 0 6px !important;
    }
    .nonconformity-chips-row .mud-chip .mud-chip-label {
        font-size: 0.7rem !important;
    }
    .nonconformity-chips-row .mud-chip .mud-icon-root {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
}

.mobile-step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f4f1;
    border: 1.5px solid #cdd8d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7a71;
    flex-shrink: 0;
}

.mobile-step-item.active .mobile-step-circle {
    background: #2D5A3D;
    border-color: #2D5A3D;
    color: #fff;
}

.mobile-step-item.completed .mobile-step-circle {
    background: #e8f5e9;
    border-color: rgba(45,90,61,0.3);
    color: #2D5A3D;
}

.mobile-step-label {
    font-size: 0.65rem;
    color: #5a6e62;
    text-align: center;
    line-height: 1.2;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-step-item.active .mobile-step-label {
    color: #2D5A3D;
    font-weight: 600;
}

.mobile-step-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px 8px;
    background: linear-gradient(90deg, #1e4a2e 0%, #2D5A3D 100%);
}

.mobile-step-current-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

@media (max-width: 800px) {
    .wizard-mobile-steps-bar {
        display: flex;
    }

    .wizard-top-bar {
        display: none !important;
    }

    .wizard-progress-subbar {
        display: none !important;
    }
}

/* =============================================
   SECTION BLOCK (GeneralDataStep visual sections)
   ============================================= */

.section-block {
    border: 1px solid #e4ede4;
    border-radius: 10px;
    overflow: hidden;
}

.section-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #f3f7f4 0%, #f8fbf8 100%);
    border-bottom: 1px solid #e4ede4;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2D5A3D;
}

/* =============================================
   SAVE STATUS BAR – fade animations
   ============================================= */

@keyframes ssbFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ssbFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes saveIconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ssb-fade-in {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: ssbFadeIn 0.3s ease forwards;
}

.ssb-fade-out-fast {
    animation: ssbFadeOut 0.4s ease forwards;
}

.save-icon-pulse {
    animation: saveIconPulse 1.2s ease-in-out infinite;
}

.ssb-saving-anim {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ssb-saving-text {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.ssb-saved-anim {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ssb-saved-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.ssb-saved-flash {
    color: #2D5A3D;
    font-weight: 600;
}

.ssb-compact-time {
    font-size: 0.72rem;
    color: #8a9e8e;
}

.ssb-lastsaved {
    display: flex;
    align-items: center;
}

.ssb-error-text {
    color: #c62828;
}

.ssb-offline-compact {
    display: flex;
    align-items: center;
}

.save-status--compact {
    display: flex;
    align-items: center;
    min-width: 40px;
}

/* =============================================
   SNACKBAR – mobile full-width override
   ============================================= */

@media (max-width: 600px) {
    .mud-snackbar-location-bottom-right {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 0 !important;
    }

    .mud-snackbar-location-bottom-right .mud-snackbar {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
}

/* =============================================
   AUDIT CARD – bottom sheet menu
   ============================================= */

.card-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

.card-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0 env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.bottom-sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.bottom-sheet-item:hover {
    background: #f5f5f5;
}

.bottom-sheet-item--danger {
    color: #d32f2f;
}

.bottom-sheet-cancel {
    padding: 16px 24px;
    text-align: center;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: background 0.15s ease;
}

.bottom-sheet-cancel:hover {
    background: #f5f5f5;
}

@media (min-width: 601px) {
    .card-bottom-sheet {
        position: absolute;
        bottom: auto;
        left: auto;
        right: 0;
        top: 100%;
        border-radius: 8px;
        width: 220px;
        padding: 4px 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .bottom-sheet-item {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .bottom-sheet-cancel {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .card-menu-overlay {
        display: none;
    }
}

/* =============================================
   DASHBOARD – CTA button & section header
   ============================================= */

.btn-continue-audit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2D5A3D;
    color: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    margin-top: 12px;
    transition: background 0.15s ease, transform 0.12s ease;
}

.btn-continue-audit:hover {
    background: #245035;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dashboard-see-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2D5A3D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
}

.dashboard-see-all:hover {
    text-decoration: underline;
}

/* =============================================
   MOBILE NAVIGATION – bottom sheet
   ============================================= */

/* Hide the desktop sidebar on mobile */
@media (max-width: 599px) {
    .desktop-only-drawer {
        display: none !important;
    }
}

/* Backdrop overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    animation: mobileNavFadeIn 0.2s ease;
}

@keyframes mobileNavFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Bottom sheet panel */
.mobile-nav-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #2D5A3D 0%, #1e4a2e 100%);
    border-radius: 18px 18px 0 0;
    z-index: 1201;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    animation: mobileNavSlideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
}

@keyframes mobileNavSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Drag handle */
.mobile-nav-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 10px auto 6px;
}

/* Nav links container */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 4px 12px 0;
}

/* Individual nav link */
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 2px;
    transition: background 0.15s ease;
    position: relative;
}

.mobile-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.mobile-nav-item.active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 600;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(180deg, #A5D6A7 0%, #4CAF50 100%);
    border-radius: 0 2px 2px 0;
}

/* Cancel button */
.mobile-nav-cancel {
    display: block;
    width: calc(100% - 24px);
    margin: 8px 12px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mobile-nav-cancel:hover {
    background: rgba(255, 255, 255, 0.16);
}

.mobile-nav-logout-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: calc(100% - 24px);
    margin: 4px 12px 0;
    padding: 12px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-logout-btn:hover {
    background: rgba(255, 80, 80, 0.12);
    color: #ff8a80;
}

/* .audit-card already has position:relative (line 207) – required for desktop sheet popover */
