/* --- General & Resets --- */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    line-height: 1.6;
}
.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px;
}
a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid #ddd; margin: 2rem 0; }

/* --- Header --- */
.main-header {
    background-color: #00a8e8; /* Bright Blue */
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-header .logo {
    font-size: 1.8em;
    font-weight: bold;
}
.main-header .logo span {
    font-size: 0.7em;
    font-weight: normal;
    opacity: 0.9;
}
.main-header .user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-header .icon-link {
    font-size: 1.8em;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}
.main-header .icon-link:hover {
    transform: scale(1.1) rotate(5deg);
}

/* --- Buttons & Forms --- */
.btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #ccc;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.2s;
}
.btn.active, .btn:hover {
    background-color: #00a8e8;
    color: white;
}
.btn-danger { background-color: #dc3545; color: white; }
.btn-danger:hover { background-color: #c82333; }
.btn-add-task {
    background: #e9e9e9;
    border: 1px dashed #aaa;
    color: #555;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}
.btn-add-task:hover { background: #dcdcdc; color: #333; }
.btn-complete {
    margin-left: auto;
    padding: 4px 8px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.btn-complete:hover { background: #218838; }

/* --- Auth Forms (Login/Register) --- */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.auth-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.auth-form h2 { margin-top: 0; color: #00a8e8; font-size: 2em;}
.auth-form h3 { color: #555; font-weight: normal; }
.form-group { text-align: left; margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #666; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.auth-form .btn { width: 100%; padding: 12px; font-size: 1.1em; margin-top: 10px; }
.auth-form p { margin-top: 20px; font-size: 0.9em; color: #777; }
.error { color: #dc3545; background: #f8d7da; padding: 10px; border-radius: 4px; border: 1px solid #f5c6cb; }
.success { color: #155724; background: #d4edda; padding: 10px; border-radius: 4px; border: 1px solid #c3e6cb; }

/* --- Main Layout Sections --- */
.projects-bar {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.content-box {
    background-color: white;
    border: 1px solid #9dbd9d; /* Greenish border */
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.box-title {
    font-weight: bold;
    color: #555;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.table-container {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}
.table-container h3 {
    margin-top: 0;
    color: #444;
}

/* --- Task Lists --- */
.task-list {
    min-height: 50px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.task-list.numbered { counter-reset: item; }
.task-list.numbered .task-item {
    display: flex;
    align-items: center;
}
.task-list.numbered .task-item::before {
    content: counter(item) ". ";
    counter-increment: item;
    font-weight: bold;
    color: #999;
    margin-right: 10px;
}
.task-item {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 10px;
}
.task-item:last-child { margin-bottom: 0; }
.task-item .task-title { flex-grow: 1; }
.task-item:hover { background-color: #f5faff; }
.task-placeholder {
    color: #aaa;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 4px;
}
.task-list.completed .task-item {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: default;
}
.task-list.completed .task-item span {
    text-decoration: line-through;
}

/* For Dragging */
.sortable-ghost {
    background: #cce5ff;
    opacity: 0.7;
}
.sortable-drag {
    opacity: 1 !important;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* In-place edit input */
.edit-input {
    width: 100%;
    padding: 5px;
    font-size: 1em;
    border: 1px solid #007bff;
    border-radius: 3px;
}

/* --- Settings & Profile Page --- */
.settings-form, .profile-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.profile-form { flex-direction: column; align-items: flex-start; }
.profile-form .form-group { width: 100%; max-width: 400px; }
.settings-form input[type="text"] {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}