/* === Reset and Global Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* === No Container Padding — Full Width === */
.container.dashboard-container {
    width: 100%;
    padding: 2rem 0;
    background: #fff;
    border-radius: 0;
}

/* === Header === */
h2 {
    text-align: center;
    color: #1e88e5;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* === Create Task Button === */
button[onclick*="toggleForm"] {
    background-color: #1e88e5;
    font-weight: bold;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    display: block;
    margin: 0 auto 1.5rem auto;
    transition: 0.3s;
}

button[onclick*="toggleForm"]:hover {
    background-color: #1565c0;
}

/* === Task Form === */
#taskForm {
    background: #fdfdfd;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    max-width: 1000px;
    border-radius: 10px;
    border: 1px solid #dbe5f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* === Form Elements === */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccd7e1;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    background: #fff;
}

/* === Buttons === */
button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button.green {
    background-color: #28a745;
    color: white;
}

button.green:hover {
    background-color: #218838;
}

button:disabled {
    background: #ccc;
    color: #777;
    cursor: not-allowed;
}

/* === Table Styling === */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2.5cm 0.5rem; /* ~2.5cm column gap */
    font-size: 0.95rem;
    margin: 0;
}

thead th {
    background-color: #1e88e5;
    color: #fff;
    padding: 0.9rem;
    text-align: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    white-space: nowrap;
}

tbody tr {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

tbody td {
    padding: 0.75rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

td select,
td input {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.95rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

td input[type="number"] {
    width: 70px;
    text-align: center;
}

/* === Timer === */
span[id^="timer_"] {
    font-weight: bold;
    color: #1e88e5;
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* === Export Link === */
a[href*="export_user_csv"] {
    display: inline-block;
    margin: 2rem 0 1rem 2rem;
    background: #17a2b8;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

a[href*="export_user_csv"]:hover {
    background: #117a8b;
}

/* === Disable States === */
select:disabled,
input:read-only,
input:disabled,
button:disabled {
    background-color: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

/* === Responsive: Mobile View === */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 1.5rem;
    }

    td {
        padding: 1rem;
        border: none;
        text-align: left;
        position: relative;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
        display: block;
        margin-bottom: 0.25rem;
    }

    td input,
    td select {
        width: 100%;
    }

    table {
        border-spacing: 1rem 0.5rem;
    }
}

.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.login-form input {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
    background-color: #fafafa;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #1565c0;
}

.login-form .error {
    color: #e53935;
    background: #ffe6e6;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    margin-top: 1rem;
}

