.services-toolbar {
    margin-bottom: 14px;
}

#services .action-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

#services .action-buttons .btn-icon-sm {
    flex: 0 0 auto;
    display: inline-flex;
}

#services .service-delete-btn {
    color: var(--danger);
}

#service-modal .service-modal-dialog {
    max-width: min(480px, 94vw);
}

@media (max-width: 900px) {
    #services .services-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    #services .services-toolbar #services-category,
    #services .services-toolbar #services-search {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    #services .glass-table-container {
        overflow: visible;
        background: transparent;
        border: none;
        border-radius: 0;
        backdrop-filter: none;
        box-shadow: none;
    }

    .services-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .services-table thead {
        display: none;
    }

    .services-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .services-table tbody tr[data-service-id] {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 14px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-widget, 12px);
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .services-table tbody tr[data-service-id]:hover td {
        background: transparent;
    }

    .services-table tbody tr[data-service-id] td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border-bottom: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        text-align: right;
        word-break: break-word;
    }

    .services-table tbody tr[data-service-id] td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 42%;
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--text-muted);
        text-align: left;
        line-height: 1.3;
    }

    .services-table .wh-card-title {
        display: block;
        padding-bottom: 12px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--glass-border);
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.35;
        text-align: left;
        color: var(--text-main);
    }

    .services-table .wh-card-title::before {
        display: none;
    }

    .services-table .wh-card-sku {
        padding-top: 4px;
    }

    .services-table .wh-card-price-sale {
        font-family: var(--font-head);
        font-weight: 700;
        color: var(--primary);
    }

    .services-table .wh-card-actions {
        padding-top: 10px;
        margin-top: 4px;
        border-top: 1px solid var(--glass-border);
        justify-content: flex-start;
    }

    .services-table .wh-card-actions::before {
        display: none;
    }

    #services .services-table .action-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
        gap: 8px;
    }

    .services-table tbody tr:not([data-service-id]) {
        display: block;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 20px 16px;
        text-align: center;
    }

    .services-table tbody tr:not([data-service-id]) td {
        display: block;
        padding: 0;
        border: none;
        text-align: center;
    }

    .services-table tbody tr:not([data-service-id]) td::before {
        display: none;
    }

    body.dark-theme .services-table tbody tr[data-service-id] {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    }
}
