/* public/css/main.css */
:root {
    --primary-bg: #f5f7fa;
    --header-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --accent-blue: #4299e1;
    --accent-green: #48bb78;
    --accent-red: #f56565;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    background-color: var(--header-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.stats-summary {
    display: flex;
    gap: 2rem;
}

.stats-summary > div {
    text-align: center;
}

.stats-summary span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.stats-summary label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.filters {
    background-color: var(--header-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

input, select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    opacity: 0.9;
}

#clearFilters {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.analyze-btn {
    background-color: var(--accent-green);
    color: white;
}

/* Modal styles */
.modal, .client-list {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content, .client-list {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header, .client-list-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body, .client-list-content {
    padding: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
}

.close-btn:hover {
    color: var(--text-primary);
}

.hidden {
    display: none;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error {
    background-color: #fff5f5;
    border: 1px solid var(--accent-red);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--accent-red);
}

.error-details {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Update status */
#updateStatus {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}