.icon {
    width: 14px;
    height: 14px;
}

/*
|--------------------------------------------------------------------------
| Estils per Tasques de Neteja - Llimpiolot
|--------------------------------------------------------------------------
|
| Afegir aquests estils al fitxer CSS principal o crear un fitxer separat
| i importar-lo al layout
|
*/

:root {
    --primary-red: #DC3545;
    --primary-red-dark: #c82333;
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --border-color: #e9ecef;
}

/* Main content */
.main-content {
    padding: 2rem;
}

.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

/* Header section */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
}

.page-title .count {
    color: var(--primary-red);
}

.page-title .icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-red);
}

/* Buttons */
.btn-add {
    background: #28a745;
    border: none;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-add:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
}

.btn-add .icon {
    width: 14px;
    height: 14px;
}

/* Search/Filter section */
.filter-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-input,
.filter-select {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    width: 100%;
    background-color: white;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.search-input {
    padding-left: 3rem;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    outline: none;
}

.search-wrapper,
.filter-wrapper {
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #6c757d;
    z-index: 2;
    pointer-events: none;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.03);
}

.data-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

/* Task name styling */
.task-name {
    font-weight: 500;
    color: var(--text-dark);
}

.task-description {
    color: #6c757d;
    font-size: 0.9rem;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-description.empty {
    font-style: italic;
    color: #adb5bd;
}

/* Action buttons - OPCIÓ A (estil actual) */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    transition: all 0.2s;
}

.btn-action .icon {
    width: 14px;
    height: 14px;
}

.btn-edit {
    background: #0d6efd;
    color: white;
}

.btn-edit:hover {
    background: #0b5ed7;
    color: white;
}

.btn-delete {
    background: var(--primary-red);
    color: white;
}

.btn-delete:hover {
    background: #bb2d3b;
    color: white;
}

.actions-cell {
    white-space: nowrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state .icon-empty {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    fill: #dee2e6;
}

/* Form styles */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-save {
    background: #28a745;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.btn-save:hover {
    background: #218838;
}

.btn-save .icon {
    width: 14px;
    height: 14px;
}

.btn-cancel {
    background: #6c757d;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

.btn-search {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    transition: all 0.2s;
}

.btn-search .icon {
    width: 24px;
    height: 24px;
}

/*
|--------------------------------------------------------------------------
| Estils addicionals per Clients - Llimpiolot
|--------------------------------------------------------------------------
*/

/* Codi d'accés */
.codi-acces {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Botó veure detall */
.btn-view {
    background: #e8f4f8;
    color: #17a2b8;
}

.btn-view:hover {
    background: #17a2b8;
    color: white;
}

/* Cards per la vista show */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.card-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.card-header h5 {
    color: var(--text-dark);
    font-weight: 600;
}

.card-body {
    padding: 1rem;
}

/* Taula dins de card */
.card .table {
    margin-bottom: 0;
}

.card .table th {
    color: #6c757d;
    font-weight: 500;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.no-photo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 8px;
    color: #adb5bd;
    border: 1px solid var(--border-color);
}

.no-photo .icon {
    width: 24px;
    height: 24px;
}