/* Modern Light Theme Variables */
:root {
    --bg-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', sans-serif; 
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    padding: 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 2px solid var(--border-color); 
}

h1 { 
    font-size: 28px; 
    font-weight: 700; 
}

.btn { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-color); 
    color: var(--text-main); 
    border: 1px solid var(--border-color); 
    padding: 0 16px;              /* Removed vertical padding, relying on height instead */
    height: 42px;                 /* Bulletproof fixed height */
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 14px;              
    font-family: inherit;         
    transition: all 0.2s; 
    text-decoration: none;        
    box-sizing: border-box;       
}

.btn:hover { 
    background-color: #f9fafb; 
    border-color: #d1d5db; 
}

.btn-primary { 
    background-color: var(--primary); 
    color: white; 
    border: 1px solid transparent; /* Keeps the math identical to the standard button */
}

.btn-primary:hover { 
    background-color: var(--primary-hover); 
    border: 1px solid transparent;
}

.btn-danger { 
    background-color: var(--danger); 
    color: white; 
    border: 1px solid transparent; /* Keeps the math identical to the standard button */
}

.btn-danger:hover { 
    background-color: var(--danger-hover); 
    border: 1px solid transparent;
}

.project-card { 
    background-color: var(--surface-color); 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    overflow: hidden; 
    margin-bottom: 30px; 
}

.project-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 25px; 
    background-color: #f9fafb; 
    border-bottom: 1px solid var(--border-color); 
}

.project-title { 
    font-size: 20px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.rate-badge { 
    font-size: 13px; 
    background: #e0e7ff; 
    color: var(--primary); 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-weight: 600; 
}

.task-row { 
    display: grid; 
    grid-template-columns: 40px auto 120px 120px 160px; 
    align-items: center; 
    padding: 16px 25px; 
    border-bottom: 1px solid var(--border-color); 
    gap: 15px; 
}

.task-row:last-child { 
    border-bottom: none; 
}

.task-header { 
    color: var(--text-muted); 
    font-size: 13px; 
    font-weight: 600; 
    text-transform: uppercase; 
}

.task-name { 
    font-weight: 500; 
}

.timer-display { 
    font-family: monospace; 
    font-size: 16px; 
    font-weight: 600; 
}

.empty-state { 
    padding: 30px; 
    text-align: center; 
    color: var(--text-muted); 
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .task-row {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .task-header { display: none; }
    .task-row > div { display: flex; justify-content: space-between; align-items: center; }
}

/* Modal (Popup) Styles */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

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

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 14px; }
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}