a/* ==========================================================================
   GLOBAL RESET & BASE
========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.5;
    background-color: #121212;
    color: #e9e9e9;
    min-height: 100vh;
    display: flex;
    transition: background-color .25s, color .25s;
}

*, *::before, *::after {
    transition: 0.2s ease;
}

/* ==========================================================================
   PAGE BACKGROUND + DARK MODE FIXES
========================================================================== */
body.dark-mode,
body.dark-mode main,
body.dark-mode .container-fluid,
body.dark-mode .card,
body.dark-mode .content {
    background-color: #121212 !important;
}

/* ==========================================================================
   CSS VARIABLES
========================================================================== */
:root {
    --bg-dark: #121212;
    --bg-card: #181818;
    --bg-sidebar: #1a1a1a;
    --bg-dark-hover: #2b2b2b;

    --text-color: #e9e9e9;
    --text-muted: #b5b5b5;

    --accent-yellow: #f4c542;
    --accent-blue: #4e8cff;
    --accent-red: #b71c1c;
    --accent-green: #2ecc71;

    --border-color: #333;

    --input-bg: #2b2b2b;
    --input-border: #555;
    --input-focus: rgba(244,197,66,.3);
}

/* ==========================================================================
   SIDEBAR
========================================================================== */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    padding: 20px 15px;
    border-right: 1px solid var(--border-color);
    transition: transform .3s ease;
    z-index: 200;
}

/* Sidebar Logo */
.sidebar-logo {
    width: 100%;
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
}

.sidebar-logo .logo-img {
    width: 70px;
    height: auto;
    opacity: 0.95;
}

.sidebar-logo .logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.sidebar h4 {
    text-align: center;
    color: var(--accent-yellow);
    margin: 1rem 0 1.25rem;
    font-weight: 700;
}

/* Sidebar links */
.sidebar a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.sidebar a.active,
.sidebar a:hover {
    background-color: var(--bg-dark-hover);
    color: #fff;
}

/* Sidebar menu groups */
.menu-group { margin-bottom: 1rem; }

.menu-toggle {
    background: none;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    color: var(--text-color);
    cursor: pointer;
    font-size: .9rem;
}
.menu-toggle:hover { background-color: var(--bg-dark-hover); }

.menu-group.open > .submenu { display: block; }
.submenu { display: none; margin-left: 1rem; }
.submenu a { padding-left: 1.5rem; color: #b3b3b3; font-size: .9rem; }

/* ==========================================================================
   TOP BAR
========================================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 65px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 150;
}
.top-bar h2 {
    flex-grow: 1;
    text-align: center;
    font-size: 1.4rem;
    color: var(--text-color);
}

/* Theme toggle */
.theme-btn {
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
    border-radius: 6px;
}

/* ==========================================================================
   MAIN CONTENT
========================================================================== */
main, main.content {
    margin-left: 260px;
    margin-top: 65px;
    padding: 25px 20px;
    width: calc(100% - 260px);
    background-color: var(--bg-dark);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0,0,0,.25);
}

/* ==========================================================================
   FORMS
========================================================================== */
input.form-control,
select.form-select,
textarea.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    padding: 10px;
    border-radius: 6px;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px var(--input-focus);
}

/* ==========================================================================
   BUTTONS
========================================================================== */
button.btn, a.btn {
    padding: 9px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .9rem;
    transition: .15s ease;
}
.btn-primary { background-color: var(--accent-yellow); color: #000; }
.btn-primary:hover { opacity: .85; }

.btn-outline-light {
    border: 1px solid #ccc;
    color: #ccc;
}
.btn-outline-light:hover { background-color: #444; }

/* ==========================================================================
   CALENDAR — CLEANED (DUPLICATES REMOVED)
========================================================================== */
.calendar-container {
    width: 100%;
    background-color: inherit !important;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed !important;
}

.calendar-table th,
.calendar-table td {
    width: calc(100% / 7) !important;
    height: 100px !important;
    vertical-align: top;
    color: #eaeaea !important;
    background-color: #1b1b1b !important;
    border: 1px solid #333 !important;
}

.calendar-table td:hover {
    background-color: #2e2e2e !important;
}

#monthTitle {
    color: #ffffff !important;
}

.calendar-table .holiday {
    background-color: #b71c1c !important;
    border-color: #7f0000 !important;
    color: #ffffff !important;
}

.calendar-table .holiday-label {
    color: #ffffff !important;
    font-weight: 600;
}

/* ==========================================================================
   TASK BADGES
========================================================================== */
.task-badge {
    display: block;
    padding: 3px 5px;
    border-radius: 4px;
    margin-top: 2px;
    font-size: .8rem;
}
.task-badge.janitorial { background-color: #ffffff; color: #000; }
.task-badge.carpet { background-color: var(--accent-green); }
.task-badge.painting { background-color: var(--accent-blue); }

/* ==========================================================================
   RESPONSIVE
========================================================================== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-260px); z-index: 999; }
    .sidebar.open { transform: translateX(0); }
    main.content { margin-left: 0; width: 100%; }
    .top-bar { left: 0; }
}

@media (max-width: 576px) {
    .calendar-table td { height: 90px; font-size: .75rem; }
    .task-badge { font-size: .65rem; }
}

/* ==========================================================================
   LIGHT MODE
========================================================================== */
body.light-mode {
    background-color: #f5f5f5;
    color: #111;
}
body.light-mode .sidebar { background-color: #fff; }
body.light-mode .top-bar { background-color: #fff; }
body.light-mode .card { background-color: #fff; }
body.light-mode .sidebar a:hover { background-color: rgba(0,0,0,.08); }
