:root {
    --primary-color: #1a3e72;       /* Deep Sapphire */
    --secondary-color: #4f4f4f;     /* Graphite */
    --background-color: #f4f2f7;    /* Pearl */
    --card-background: #ffffff;     /* White */

    --success-color: #2e7d4f;       /* Emerald */
    --warning-color: #e2a700;       /* Gold */
    --danger-color: #b3223c;        /* Ruby */
}


/*
 * Global Styles for Minimalist Task Manager (Centered Style)
 * Primary Color: #489E45 (Green)
 * Background Color: #fafafa (Off-White)
 * Card/Container Color: #ffffff (White)
 */

/* --- Base & Layout --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif; /* Assuming Poppins is available */
    background: #fafafa;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Reusing .landing style for .container on small pages (login/register) */
/* Expanding max-width for complex pages (index/history) */
.container {
    padding: 40px 30px;
    max-width: 1200px;
    width: 90%;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 12px 45px rgba(0,0,0,0.08);
    animation: fadeInUp 0.9s ease;
    margin: 40px auto; /* Fallback for non-centered pages */
}

/* Specific styling for login/register/post pages (narrower, centered) */
.auth-container {
    text-align: center;
    padding: 40px 20px;
    max-width: 480px;
    width: 90%;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 12px 45px rgba(0,0,0,0.08);
    animation: fadeInUp 0.9s ease;
    margin: 0px 8px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    color: #1e1e1e; /* Darker H1 */
    border-bottom: none;
    padding-bottom: 0;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e1e1e;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* --- Typography & Links --- */
a {
    color: #489E45;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #3d893a;
    text-decoration: underline;
}

.back-link {
    font-weight: 500;
    margin-bottom: 20px;
    display: inline-block;
    text-decoration: none;
}

/* --- Buttons & Actions --- */
.action-bar {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 14px 30px; /* Larger padding for the new style */
    border: none;
    border-radius: 14px; /* Rounded corners */
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: 0.25s ease;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Primary Action: Launch/Save/Add */
.btn-primary, .btn-success {
    background-color: #489E45; 
    color: #fff;
}
.btn-primary:hover, .btn-success:hover {
    background: #3d893a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Edit/Warning Action */
.btn-warning {
    background-color: #ffc107; /* Standard warning color */
    color: #1e1e1e;
}
.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
}

/* Delete/Danger Action */
.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}


/* --- Forms --- */
form {
    text-align: left; /* Ensure form content is left-aligned within containers */
}
form div { 
    margin-bottom: 15px; 
}
label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: 600;
    color: #495057;
}
input[type="text"], input[type="password"], textarea, select { 
    width: 100%; 
    padding: 12px; /* Slightly larger padding */
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 10px; /* Rounded corners */
    box-sizing: border-box; 
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fcfcfc;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: #489E45;
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 158, 69, 0.2); /* Green focus ring */
}

/* --- Messages --- */
.message {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: left;
}
.message-error {
    background-color: #ffe0e0; /* Lighter Red background */
    color: #c82333;
    border: 1px solid #f5c6cb;
}
.message-success {
    background-color: #e0ffe0; /* Lighter Green background */
    color: #3d893a;
    border: 1px solid #c3e6cb;
}
.error-inline {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* --- Table Styles (index.php, task_history.php) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
}
.data-table th, .data-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0; /* Very light border */
    text-align: left;
}
.data-table th {
    background-color: #fcfcfc;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85em;
}
.data-table tr:hover td {
    background-color: #f8f8f8;
}

/* --- Badges for Status/Priority --- */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px; /* Slightly more rounded */
    font-size: 0.75em;
    font-weight: bold;
    color: white;
    text-align: center;
}

/* Priority Colors (Minimalist approach: use theme colors) */
.priority-High { background-color: #dc3545; }
.priority-Medium { background-color: #ffc107; color: #1e1e1e; }
.priority-Low { background-color: #489E45; } /* Theme Green for Low priority */

/* Status Colors */
.status-Pending { background-color: #6c757d; }
.status-In-Progress { background-color: #489E45; }
.status-Completed { background-color: #17a2b8; } /* Using a tertiary color for completed */

/* History Table Colors (Lighter variants) */
.change-type-Created { background-color: #e0ffe0; } 
.change-type-Priority-Changed, .change-type-Status-Changed { background-color: #fff8e0; } 
.change-type-Title-Updated { background-color: #e0f0ff; }
.change-type-Description-Updated { background-color: #f8e0e0; }

/* --- Keyframe Animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}