/* styles.css */

/* --- Root Variables --- */
:root {
    --primary-color: #3b82f6; /* Blue 500 */
    --primary-hover-color: #2563eb; /* Blue 600 */
    --bg-color: #f8fafc; /* Slate 50 */
    --surface-color: #ffffff;
    --text-color: #1e293b; /* Slate 800 */
    --subtle-text-color: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

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

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; color: var(--primary-color); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; color: var(--subtle-text-color); }

ul {
    list-style: none;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    box-shadow: var(--box-shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

nav h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--primary-color);
}

#user-actions button {
    margin-left: 0.5rem;
}

/* --- Forms & Buttons --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

button:hover {
    background-color: var(--primary-hover-color);
}

/* --- Card --- */
.card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

/* --- Auth Views --- */
#login-view, #register-view {
    max-width: 450px;
    margin: 2rem auto;
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* --- Dashboard Layout --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

#project-list-container {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

#project-list .project-item {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

#project-list .project-item:hover {
    background-color: var(--bg-color);
}

#project-list .project-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* --- Project View --- */
#task-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.task-column {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.task-column h4 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.task-list {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.task-item {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    cursor: pointer;
}

#comments-section {
    margin-top: 2rem;
}

#comment-list li {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

/* --- Responsive Design (Mobile-First) --- */
@media (min-width: 768px) {
    .dashboard-layout {
        /* 1fr for project list, 3fr for main content */
        grid-template-columns: 1fr 3fr;
    }

    #task-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}