/* Shared utility classes to keep PHP/HTML free from inline styling */
.header-logo-icon {
    width: 44px;
    height: 44px;
}

.flash-message {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(23, 34, 53, 0.14);
}

.flash-success {
    background: linear-gradient(135deg, #20874a, #2ea95f);
}

.flash-error {
    background: linear-gradient(135deg, #b92f3a, #d84a57);
}

.icon-50 {
    width: 50px;
    height: 50px;
}

.icon-60 {
    width: 60px;
    height: 60px;
}

.form-errors {
    max-width: 760px;
    margin: 0 auto 1rem;
    color: #8f1f28;
    background: #ffe8eb;
    border: 1px solid #ffcdd4;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
}

.account-type-label {
    display: block;
    text-align: center;
    margin-bottom: 0.85rem;
    font-weight: 800;
}

.spaced-group {
    margin-bottom: 1rem;
}

.auth-switch-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.93rem;
}

.auth-switch-link {
    color: #0f4c81;
    font-weight: 700;
}

.error-visible {
    display: block;
}

.header-subtext {
    color: #66758f;
    font-size: 0.82rem;
}

.back-to-store {
    display: inline-block;
    text-align: center;
    color: #0f4c81;
    font-weight: 700;
}

.page-title-center {
    text-align: center;
}

.parts-actions {
    text-align: center;
    margin: 0.9rem 0;
}

.parts-empty {
    width: 100%;
    text-align: center;
    color: #5f6f89;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #c9d5e6;
    padding: 1rem;
}

.part-card-image {
    object-fit: cover;
    width: 100%;
    height: 190px;
    border-radius: 10px;
}

.part-desc {
    padding: 0 0.25rem;
}

.order-link-wrap {
    padding: 0 0.45rem 0.8rem;
    text-align: center;
}

.payment-label {
    display: block;
    margin-top: 0.45rem;
}

.maintenance-section {
    margin: 1.2rem auto;
    padding: 1.1rem;
}

.maintenance-title {
    text-align: center;
    margin-bottom: 0.65rem;
}

.maintenance-intro {
    text-align: center;
    margin-bottom: 1rem;
    color: #5f6f89;
}

.maintenance-form,
.grid-form,
.grid-form-tight {
    display: grid;
    gap: 0.72rem;
}

.primary-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.68rem 1rem;
}

.maintenance-orders {
    max-width: 900px;
    margin: 0 auto 1.6rem;
}

.section-title-center {
    text-align: center;
    margin-bottom: 0.65rem;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.clean-table th,
.clean-table td {
    padding: 0.62rem;
    border: 1px solid #e6edf6;
    text-align: center;
}

.clean-table th {
    background: #f2f6fd;
    color: #324664;
}

.service-card-shadow {
    box-shadow: 0 10px 20px rgba(23, 34, 53, 0.12);
}

.section-service-center {
    justify-content: center;
}

.emergency-service-left,
.emergency-service-right {
    margin: 0;
}

.emergency-service-icon {
    width: 50px;
    height: 50px;
    margin-inline: auto;
}

.chat-title {
    font-weight: 700;
}

.chat-status {
    font-size: 0.78rem;
    opacity: 0.85;
}

.panel-section {
    padding: 1.1rem;
}

.panel-title {
    margin-bottom: 0.75rem;
}

.panel-intro {
    margin-bottom: 0.8rem;
    color: #5f6f89;
}

.order-page-wrap {
    margin: 1.3rem auto;
}

.order-panel {
    padding: 1rem;
}

.order-panel+.order-panel {
    margin-top: 1rem;
}

.selected-part-box {
    margin-bottom: 0.75rem;
}

.part-list-row {
    border-bottom: 1px solid #e8edf5;
    padding: 0.7rem 0;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.part-order-link {
    align-self: center;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
}

.hidden-redirect-form {
    display: none;
}

/* Loading utility states */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.88;
}

.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-inline-start: 8px;
    animation: spin 0.75s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .part-list-row {
        flex-direction: column;
        align-items: stretch;
    }

    .clean-table,
    .clean-table thead,
    .clean-table tbody,
    .clean-table th,
    .clean-table td,
    .clean-table tr {
        display: block;
        width: 100%;
    }

    .clean-table tr {
        margin-bottom: 0.8rem;
        border: 1px solid #e6edf6;
        border-radius: 10px;
        overflow: hidden;
    }

    .clean-table th {
        display: none;
    }

    .clean-table td {
        text-align: right;
    }
}