/* ===== Light mode (default) ===== */
body {
    background-color: #ffffff;
    color: #000000;
}

/* ===== Dark mode ===== */
body.dark-mode {
    color:#cccccc;
    background-color: #1e1e1e;
}
body.dark-mode table,
body.dark-mode td,
body.dark-mode th {
    border-color: #555;
}

body.dark-mode th {
    background-color: #1e1e1e;
    color: #ffffff;
}

body.dark-mode td {
    background-color: #181818;
    color: #ffffff;
}   

/* ===== Light mode (explicit styles) ===== */
table,
td,
th {
    border-color: #000;
}

th {
    background-color: #f0f0f0;
}

td {
    background-color: #f0f0f0;
}

body.dark-mode table,
body.dark-mode td,
body.dark-mode th {
    border-color: #555;
}

body.dark-mode th {
    background-color: #1e1e1e;
}

body.dark-mode td {
    background-color: #181818;
}

/* Task status colors (dark mode friendly) */
body.dark-mode .done {
    color: #4caf50;
}

body.dark-mode .not-done {
    color: #ef5350;
}

/* Completion percentage colors */
.percent-red {
    color: #ef5350;
}

.percent-yellow {
    color: #fbc02d;
}

.percent-green {
    color: #66bb6a;
}

/* Buttons */
button {
    margin: 4px;
    padding: 6px 10px;
    cursor: pointer;
}

body.dark-mode button {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #555;
}

/* ===== Todo list container ===== */
#content {
    max-width: 600px;
    margin: 20px auto;
}

/* ===== Todo item ===== */
.todo {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;

    padding: 12px 16px;
    margin-bottom: 10px;

    font-size: 16px;
    line-height: 1.4;

    cursor: pointer;
    user-select: none;

    display: flex;
    align-items: center;

    transition: 
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

/* Hover effect */
.todo:hover {
    background-color: #eeeeee;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Click feedback */
.todo:active {
    transform: scale(0.98);
}

/* ===== Dark mode ===== */
body.dark-mode .todo {
    background-color: #1f1f1f;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .todo:hover {
    background-color: #2a2a2a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ===== Optional: subtle indicator dot ===== */
.todo::before {
    content: "•";
    color: #999;
    font-size: 22px;
    margin-right: 10px;
}

body.dark-mode .todo::before {
    color: #777;
}

/* ===== Done item ===== */
.done {
    background-color: #f0f8f0;
    border: 1px solid #b6e2b6;
    border-radius: 8px;

    padding: 12px 16px;
    margin-bottom: 10px;

    font-size: 16px;
    line-height: 1.4;

    display: flex;
    align-items: center;

    color: #2e7d32;
    opacity: 0.9;

    position: relative;
}

/* Checkmark icon */
.done::before {
    content: "✔";
    color: #2e7d32;
    font-size: 18px;
    margin-right: 10px;
}

/* ===== Dark mode ===== */
body.dark-mode .done {
    background-color: #162016;
    border-color: #2e7d32;
    color: #a5d6a7;
}

body.dark-mode .done::before {
    color: #66bb6a;
}

/* ===== Optional: strike-through ===== */
.done {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

/* ===== Reports table ===== */
#content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

#content th,
#content td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #000;
}

/* Header */
#content th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Cells */
#content td {
    background-color: #ffffff;
}

/* ===== Dark mode ===== */
body.dark-mode #content th,
body.dark-mode #content td {
    border-color: #555;
}

body.dark-mode #content th {
    background-color: #1e1e1e;
    color: #ffffff;
}

body.dark-mode #content td {
    background-color: #181818;
    color: #ffffff;
}

/* ===== Default content (Todo / Done cards) ===== */
#content {
    max-width: 600px;
    margin: 20px auto;
}

/* ===== Reports view: full width ===== */
#content table {
    width: 100%;
}

#content:has(table) {
    max-width: none;
    margin: 20px;
}