/* SuiviLocation - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--text-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Status message */
.status-message {
    padding: 2rem;
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-light);
}

.status-message.success {
    color: var(--success-color);
}

/* Properties list */
.properties-list {
    display: grid;
    gap: 1rem;
}

.property-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.property-info p {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.property-actions button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.property-actions button:hover {
    background-color: #1d4ed8;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filters input,
.filters select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.filters input {
    flex: 1;
}

/* Table */
.receipts-table {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--bg-light);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-sent {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Action buttons in table */
td button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

td button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

td button:active {
    transform: translateY(0);
}

/* Different button styles for different actions */
td button:nth-child(1) {
    background-color: var(--primary-color);
}

td button:nth-child(2) {
    background-color: var(--success-color);
}

td button:nth-child(2):hover {
    background-color: #059669;
}

/* Retry button (for failed receipts) - only when there are 3 buttons */
td button:nth-child(3) {
    background-color: var(--warning-color);
}

td button:nth-child(3):hover {
    background-color: #d97706;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.pagination-controls button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-controls button:hover {
    background-color: #1d4ed8;
}

.pagination-controls button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.page-info {
    color: var(--text-light);
    font-size: 0.875rem;
}

.pagination-info {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .property-card {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .property-actions {
        width: 100%;
    }

    .property-actions button {
        width: 100%;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    td button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pagination-controls button {
        width: 100%;
    }

    .page-info {
        order: -1;
    }
}
