.pwa-install-prompt {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    display: flex;
    max-width: min(420px, calc(100vw - 32px));
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    padding: 12px;
    color: #111827;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.pwa-install-prompt[hidden] {
    display: none;
}

.pwa-install-prompt span {
    display: block;
    color: #92400e;
    font-size: 13px;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
}

.pwa-install-actions button,
.pwa-bottom-nav a,
.pwa-qr-fab {
    min-height: 44px;
    touch-action: manipulation;
}

.pwa-install-actions button {
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pwa-install-actions [data-pwa-install-button] {
    background: #111827;
    color: #fff;
}

.pwa-install-actions [data-pwa-install-dismiss] {
    background: #fef3c7;
    color: #78350f;
}

.pwa-bottom-nav,
.pwa-qr-fab {
    display: none;
}

.pwa-offline-sync-summary {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    color: #111827;
}

.pwa-offline-sync-summary p {
    margin: 0;
    color: #4b5563;
    font-size: 13px;
}

.pwa-offline-sync-summary p + p {
    margin-top: 4px;
}

.pwa-offline-sync-summary [data-offline-sync-message] {
    color: #111827;
    font-weight: 700;
}

.pwa-offline-sync-summary-grid {
    display: grid;
    gap: 4px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pwa-offline-form {
    display: grid;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.pwa-offline-form h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.pwa-offline-form label {
    display: grid;
    gap: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.pwa-offline-form input,
.pwa-offline-form select,
.pwa-offline-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    color: #111827;
    font: inherit;
}

.pwa-offline-form textarea {
    min-height: 92px;
}

.pwa-offline-form-actions,
.pwa-offline-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pwa-offline-form button,
.pwa-offline-item-actions button {
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #111827;
    padding: 9px 12px;
    color: #fff;
    font: inherit;
    font-weight: 800;
}

.pwa-offline-form button[data-offline-save-draft],
.pwa-offline-item-actions button:last-child {
    background: #fff;
    color: #374151;
}

.pwa-offline-item {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.pwa-offline-item strong,
.pwa-offline-item span {
    display: block;
}

.pwa-offline-item span {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.pwa-offline-item p {
    margin: 8px 0 0;
    color: #b91c1c;
    font-size: 13px;
}

.pwa-offline-details {
    margin-top: 8px;
}

.pwa-offline-details pre {
    max-width: min(74vw, 720px);
    overflow-x: auto;
    border-radius: 6px;
    background: #f9fafb;
    padding: 10px;
    font-size: 12px;
}

.pwa-offline-empty {
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 76px;
    }

    button,
    a[role="button"],
    input,
    select,
    textarea,
    .fi-btn {
        min-height: 44px;
    }

    .fi-main,
    .fi-page,
    main {
        scroll-padding-bottom: 92px;
    }

    .fi-ta-content,
    .fi-ta-table,
    .fi-section-content-ctn {
        overflow-x: auto;
    }

    .fi-ta-table table,
    table {
        width: max-content;
        min-width: 100%;
    }

    .pwa-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 55;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        border-top: 1px solid #e5e7eb;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -14px 35px rgba(15, 23, 42, .08);
        backdrop-filter: blur(10px);
    }

    .pwa-bottom-nav a {
        display: grid;
        place-items: center;
        padding: 8px 4px;
        color: #374151;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
    }

    .pwa-bottom-nav a:hover,
    .pwa-bottom-nav a:focus {
        color: #b45309;
        background: #fffbeb;
    }

    .pwa-qr-fab {
        position: fixed;
        right: 16px;
        bottom: 86px;
        z-index: 56;
        display: grid;
        width: 56px;
        height: 56px;
        place-items: center;
        border-radius: 50%;
        background: #111827;
        color: #fff;
        font-weight: 800;
        text-decoration: none;
        box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
    }

    .pwa-camera-unavailable .pwa-qr-fab {
        display: none;
    }

    .pwa-install-prompt {
        right: 10px;
        bottom: 82px;
        left: 10px;
        align-items: flex-start;
    }

    .pwa-offline-sync-summary {
        flex-direction: column;
    }

    .pwa-offline-sync-summary-grid {
        grid-template-columns: 1fr;
    }

    .pwa-install-actions {
        flex-shrink: 0;
        flex-direction: column;
    }

    .pwa-technician-dashboard .fi-section {
        border-radius: 8px;
    }

    .pwa-offline-item {
        flex-direction: column;
    }
}
