:root {
    --primary: #38a169;
    --primary-dark: #277d47;
    --primary-light: #e6f4ea;
    --danger: #e53e3e;
    --danger-dark: #a61c1c;
    --muted: #718096;
    --background: #f4f7fa;
    --card-bg: #fff;
}

body, html {
    background: var(--background);
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI',SegoeUI,Arial,sans-serif;
}

.menu-bar {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(40,40,40,0.12);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 100;
    min-height: 56px;
}
.menu-bar .brand {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-dark);
    margin-right: 32px;
    letter-spacing: 0.5px;
}
.menu-btn {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    padding: 10px 22px;
    margin-right: 6px;
    font-size: 1em;
    font-weight: 600;
    transition: background .15s, color .15s, box-shadow .15s;
    box-shadow: 0 0 0 0 transparent;
}
.menu-btn.active,
.menu-btn:focus,
.menu-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(56,161,105,0.11);
}
.btn-logout {
    background: var(--danger);
    color: #fff;
    font-weight: bold;
    margin-left: auto;
    margin-right: 0;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1em;
}
.btn-logout:hover { background: var(--danger-dark); }

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(40,40,40,0.10);
    padding: 32px;
    margin-bottom: 32px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin: 0 5px 10px 0;
    transition: background .15s, color .15s, box-shadow .15s;
    background: #eee;
    color: #222;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-success {
    background: #1a9a3f;
    color: #fff;
}
.btn-success:hover { background: #187034; }
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: var(--danger-dark); }
.btn-secondary {
    background: #bbb;
    color: #fff;
}
.btn-secondary:hover { background: #888; }

ul#user-type-list, ul#department-list {
    padding-left: 0;
}
#user-type-list li, #department-list li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
#user-type-list li span, #department-list li span {
    flex: 1;
}
#user-table button,
#user-type-list button,
#department-list button {
    margin-left: 7px;
    margin-bottom: 0;
    padding: 6px 14px;
    font-size: .98em;
}
#auth {
    max-width: 340px;
    margin: 80px auto;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(40,40,40,0.10);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}
#auth input {
    font-size: 1em;
    margin: 7px 0;
    padding: 10px;
    width: 90%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
#auth button {
    margin-top: 12px;
}
.modal {
    position: fixed;
    left: 50%; top: 50%; transform: translate(-50%,-50%);
    background: #fff;
    border: 1px solid #bbb;
    box-shadow: 0 8px 32px rgba(40,80,40,0.10);
    padding: 30px 36px 24px 36px;
    border-radius: 20px;
    z-index: 1000;
    min-width: 300px;
    text-align: center;
}
.modal input, .modal select {
    margin: 8px 0;
    padding: 8px;
    font-size: 1.1em;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    width: 90%;
}
.modal button {
    margin: 7px 8px 0 8px;
    padding: 8px 20px;
}

/* Task backgrounds */
.task {
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px 10px;
    transition: background .15s;
    background: #fff;
}
.task.overdue {
    background: #ffe5e5;
    border-left: 6px solid #e53e3e;
}
.task.done-task,
.task.completed {
    background: #e6f4ea;
    border-left: 6px solid #38a169;
}
.timer {
    color: #e53e3e;
    font-weight: bold;
    margin-bottom: 6px;
}
.task .btn {
    margin-top: 8px;
}
.task .btn + .btn {
    margin-left: 10px;
}
.task span,
.task small,
.task .completed-label,
.task .timeline-inputs,
.task .history-block,
.task .timer {
    display: block;
    margin-bottom: 7px;
}
.overdue-history {
    background: #fffbe5;
    border-left: 6px solid #f6c700;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 6px;
}

/* Tabs for user task page - removed, replaced by side menu */

/* Side menu for user tasks page */
#user-task-page {
    display: flex;
    flex-direction: row;
    gap: 0;
    min-height: 400px;
    background: none;
}

.user-task-sidemenu {
    background: #f7fafc;
    padding: 36px 0 0 0;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    border-radius: 14px 0 0 14px;
    box-shadow: 0 2px 8px rgba(80,80,80,0.05);
}
.user-task-sidebtn {
    background: none;
    border: none;
    text-align: left;
    color: #444;
    padding: 18px 28px;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    transition: background .14s, color .14s;
    border-left: 5px solid transparent;
    outline: none;
}
.user-task-sidebtn.active,
.user-task-sidebtn:focus {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 5px solid var(--primary);
}

.user-task-main {
    flex: 1;
    padding: 36px 30px 26px 40px;
    background: #fff;
    border-radius: 0 14px 14px 0;
    min-width: 0;
}

/* Tabs for users-panel tasks */
.users-task-tabs {
    margin-bottom: 16px;
}
.users-task-tab {
    margin-right: 10px;
    background: #f7fafc;
    color: #444;
    border: 1px solid #d1d5db;
    border-radius: 8px 8px 0 0;
    font-size: 1em;
    font-weight: 500;
    padding: 8px 18px;
    transition: background .15s, color .15s;
}
.users-task-tab.active,
.users-task-tab:hover {
    background: var(--primary);
    color: #fff;
    border-bottom: 2px solid var(--primary);
}
#users-task-tab-list {
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    #user-task-page {
        flex-direction: column;
    }
    .user-task-sidemenu {
        flex-direction: row;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 0 0;
    }
    .user-task-sidebtn {
        border-left: none;
        border-bottom: 4px solid transparent;
        flex: 1;
        text-align: center;
        padding: 12px 0;
    }
    .user-task-sidebtn.active,
    .user-task-sidebtn:focus {
        background: var(--primary-light);
        color: var(--primary-dark);
        border-left: none;
        border-bottom: 4px solid var(--primary);
    }
    .user-task-main {
        padding: 20px 8px 20px 8px;
        border-radius: 0;
    }
}
/* Side menu for user tasks page */
#user-task-page {
    display: flex;
    flex-direction: row;
    gap: 0;
    min-height: 400px;
    background: none;
}

.user-task-sidemenu {
    background: #f7fafc;
    padding: 36px 0 0 0;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    border-radius: 14px 0 0 14px;
    box-shadow: 0 2px 8px rgba(80,80,80,0.05);
}
.user-task-sidebtn {
    background: none;
    border: none;
    text-align: left;
    color: #444;
    padding: 18px 28px;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    transition: background .14s, color .14s;
    border-left: 5px solid transparent;
    outline: none;
}
.user-task-sidebtn.active,
.user-task-sidebtn:focus {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 5px solid var(--primary);
}

.user-task-main {
    flex: 1;
    padding: 36px 30px 26px 40px;
    background: #fff;
    border-radius: 0 14px 14px 0;
    min-width: 0;
}

@media (max-width: 800px) {
    #user-task-page {
        flex-direction: column;
    }
    .user-task-sidemenu {
        flex-direction: row;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 0 0;
    }
    .user-task-sidebtn {
        border-left: none;
        border-bottom: 4px solid transparent;
        flex: 1;
        text-align: center;
        padding: 12px 0;
    }
    .user-task-sidebtn.active,
    .user-task-sidebtn:focus {
        background: var(--primary-light);
        color: var(--primary-dark);
        border-left: none;
        border-bottom: 4px solid var(--primary);
    }
    .user-task-main {
        padding: 20px 8px 20px 8px;
        border-radius: 0;
    }
}
.no-edit-remark {
    color: #c00;
    font-size: 13px;
    margin-top: 4px;
}
.profile-card {
    max-width: 410px;
    margin: 40px auto;
    padding: 34px 24px 28px 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 32px #0002, 0 2px 10px #0083ff22;
    position: relative;
    text-align: center;
    transition: box-shadow 0.2s;
}
.profile-card:hover {
    box-shadow: 0 12px 40px #0083ff33, 0 2px 12px #0083ff22;
}
.profile-avatar {
    width: 84px;
    height: 84px;
    background: linear-gradient(135deg, #5e9fff 70%, #c4e0ff 100%);
    border-radius: 50%;
    margin: -70px auto 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px #0083ff11;
}
.profile-avatar-icon {
    font-size: 44px;
    color: #fff;
}
.profile-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2262b8;
}
.profile-form {
    text-align: left;
    margin-top: 0;
}
.profile-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.profile-row label {
    width: 36%;
    font-weight: 500;
    color: #2262b8;
    font-size: 15px;
    letter-spacing: 0.2px;
}
.profile-row input {
    width: 64%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #cdf;
    border-radius: 7px;
    background: #f7fafe;
    outline: none;
    transition: border-color 0.2s;
}
.profile-row input:focus {
    border-color: #4fa3ff;
    background: #f0f8ff;
}
.profile-row input.readonly {
    background: #f1f1f1;
    color: #888;
}
.profile-save-btn {
    margin: 22px auto 0 auto;
    padding: 12px 32px;
    font-size: 18px;
    border-radius: 7px;
    background: linear-gradient(90deg, #4fa3ff, #2262b8);
    color: #fff;
    border: none;
    font-weight: 700;
    box-shadow: 0 2px 12px #0083ff33;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.25s, box-shadow 0.2s;
    display: block;
}
.profile-save-btn:hover {
    background: linear-gradient(90deg, #2262b8, #4fa3ff);
    box-shadow: 0 4px 20px #0083ff33;
}
@media (max-width: 600px) {
    .profile-card { max-width: 98vw; padding: 18px 4vw 20px 4vw; }
    .profile-row label { width: 40%; font-size: 14px; }
    .profile-row input { width: 60%; font-size: 15px; }
    .profile-title { font-size: 21px; }
    .profile-avatar { width: 58px; height: 58px; }
    .profile-avatar-icon { font-size: 30px; }
    .profile-save-btn { font-size: 16px; padding: 10px 16px;}
}
.user-top-name {
    font-size: 17px;
    color: #2262b8;
    font-weight: 600;
    margin-left: 30px;
    letter-spacing: 0.2px;
}
/* Profile and My Tasks panel styling (add or merge with your main.css as needed) */
        .profile-card {
            max-width: 410px;
            margin: 40px auto;
            padding: 34px 24px 28px 24px;
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 8px 32px #0002, 0 2px 10px #0083ff22;
            position: relative;
            text-align: center;
            transition: box-shadow 0.2s;
        }
        .profile-avatar {
            width: 84px;
            height: 84px;
            background: linear-gradient(135deg, #5e9fff 70%, #c4e0ff 100%);
            border-radius: 50%;
            margin: -70px auto 18px auto;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 24px #0083ff11;
        }
        .profile-avatar-icon {
            font-size: 44px;
            color: #fff;
        }
        .profile-title {
            margin-top: 0;
            margin-bottom: 24px;
            font-weight: 700;
            letter-spacing: 1px;
            color: #2262b8;
        }
        .profile-form {
            text-align: left;
            margin-top: 0;
        }
        .profile-row {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
        }
        .profile-row label {
            width: 36%;
            font-weight: 500;
            color: #2262b8;
            font-size: 15px;
            letter-spacing: 0.2px;
        }
        .profile-row input {
            width: 64%;
            padding: 8px 12px;
            font-size: 16px;
            border: 1px solid #cdf;
            border-radius: 7px;
            background: #f7fafe;
            outline: none;
            transition: border-color 0.2s;
        }
        .profile-row input:focus {
            border-color: #4fa3ff;
            background: #f0f8ff;
        }
        .profile-row input.readonly {
            background: #f1f1f1;
            color: #888;
        }
        .profile-save-btn {
            margin: 22px auto 0 auto;
            padding: 12px 32px;
            font-size: 18px;
            border-radius: 7px;
            background: linear-gradient(90deg, #4fa3ff, #2262b8);
            color: #fff;
            border: none;
            font-weight: 700;
            box-shadow: 0 2px 12px #0083ff33;
            cursor: pointer;
            letter-spacing: 0.5px;
            transition: background 0.25s, box-shadow 0.2s;
            display: block;
        }
        .profile-save-btn:hover {
            background: linear-gradient(90deg, #2262b8, #4fa3ff);
            box-shadow: 0 4px 20px #0083ff33;
        }
        @media (max-width: 600px) {
            .profile-card { max-width: 98vw; padding: 18px 4vw 20px 4vw; }
            .profile-row label { width: 40%; font-size: 14px; }
            .profile-row input { width: 60%; font-size: 15px; }
            .profile-title { font-size: 21px; }
            .profile-avatar { width: 58px; height: 58px; }
            .profile-avatar-icon { font-size: 30px; }
            .profile-save-btn { font-size: 16px; padding: 10px 16px;}
        }
        
        /* My Tasks side menu styles */
        .my-tasks-sidemenu {
            min-width: 180px;
            border-right: 1px solid #e5e5e5;
            padding: 0;
            background: #f7fafd;
        }
        .my-task-sidebtn {
            display: block;
            width: 100%;
            padding: 14px 14px;
            background: none;
            border: none;
            border-left: 4px solid transparent;
            font-size: 16px;
            text-align: left;
            cursor: pointer;
            transition: background 0.1s, border-color 0.1s;
        }
        .my-task-sidebtn.active, .my-task-sidebtn:hover {
            background: #eaf4ff;
            border-left: 4px solid #2262b8;
            font-weight: 600;
        }
        .my-tasks-main {
            flex: 1 1 0%;
            padding: 22px;
        }
        #my-tasks-list {
            list-style: none; 
            padding: 0;
            margin: 0;
        }
        #my-tasks-list li {
            background: #f3f8fc;
            margin-bottom: 15px;
            padding: 16px 14px;
            border-radius: 8px;
            box-shadow: 0 2px 10px #0083ff09;
        }
        .user-top-name {
            font-size: 17px;
            color: #2262b8;
            font-weight: 600;
            margin-left: 30px;
            letter-spacing: 0.2px;
        }
        #login-username, #login-password {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        padding: 8px 12px;
        }
        #toggle-password {
        font-size: 28px !important;
        line-height: 1;
        height: 38px;
        width: 38px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        }