:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --background: #F3F4F6;
    --surface: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    
    /* Status Colors */
    --status-pending: #F59E0B;
    --status-completed: #3B82F6;
    --status-validated: #10B981;
    
    --nav-height: 65px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    padding-bottom: calc(var(--nav-height) + 20px);
}

.text-center { text-align: center; }

/* Flashes */
.flashes {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    z-index: 1000;
    list-style: none;
    transition: opacity 0.3s;
}

.flashes li {
    background-color: var(--text-main);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.content-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography & General Classes */
h1 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-main); }
h2 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-main); }
p { margin-bottom: 1rem; line-height: 1.5; color: var(--text-muted); }

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
}

.login-container h1 { font-size: 2.5rem; letter-spacing: -1px; }

.profile-selectors {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    transition: filter 0.2s;
    text-decoration: none;
}

.btn:active { filter: brightness(0.9); }

.btn-profile {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.profile-tom { background-color: #3B82F6; color: white; }
.profile-jordi { background-color: #6366F1; color: white; }
.profile-nata { background-color: #EC4899; color: white; }

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.metric-card {
    background: var(--surface);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
}

.metric-card.highlight {
    background: var(--primary);
    color: white;
    grid-column: span 2;
}

.metric-card.highlight p { color: rgba(255,255,255,0.9); }

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Task List */
.task-list { display: flex; flex-direction: column; gap: 15px; }

.task-card {
    background: var(--surface);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.badge-pending { background-color: var(--status-pending); }
.badge-completed { background-color: var(--status-completed); }
.badge-validated { background-color: var(--status-validated); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background-color: var(--surface);
}
textarea.form-control { min-height: 100px; resize: vertical; }

/* Image Upload Preview */
.photo-upload-group {
    background: #F9FAFB;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.photo-upload-group input[type="file"] {
    width: 100%;
    margin-top: 10px;
}

.task-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.image-preview {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-label {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.nav-item:hover { color: var(--primary); }

/* Details Section */
.details-section {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.details-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0;}

.btn-validation { background-color: var(--status-validated); margin-top:10px; }
.btn-pay { background-color: #8B5CF6; margin-top:10px;}
