:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #20c997;
    --danger-color: #dc3545;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --light-gray: #e9ecef;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 { color: var(--text-color); margin-top: 0; margin-bottom: 1rem; }

/* Header / nav */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
nav .brand { font-weight: 700; font-size: 1.1rem; }
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}
nav ul li a { color: white; text-decoration: none; padding: 5px 0; }
nav ul li a:hover { border-bottom: 2px solid white; }
nav .whoami { font-size: 0.85rem; opacity: 0.85; }

.bell { position: relative; font-size: 1.1rem; }
.badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger-color);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    padding: 0 6px;
    line-height: 1.4;
}

/* Flash messages */
.flashes {
    list-style: none;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    background-color: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}
.flashes li { margin-bottom: 4px; }

/* Forms */
form { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
form.narrow { max-width: 480px; }
label { display: block; margin-bottom: 6px; font-weight: 600; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}
button {
    background-color: var(--primary-color);
    color: white;
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}
button:hover { background-color: #0b5ed7; }
.delete-button { background-color: var(--danger-color); }
.delete-button:hover { background-color: #bb2d3b; }

/* Calendar */
#calendar { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
/* Bigger, clearer day events (only 1–2 shifts per day) */
.fc .fc-daygrid-day-frame { min-height: 100px; }
.fc .fc-daygrid-event { white-space: normal; padding: 6px 8px; margin: 3px 5px; border-radius: 6px; }
.fc .fc-daygrid-event .ev-time { font-size: 0.8rem; opacity: 0.9; }
.fc .fc-daygrid-event .ev-name { font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.fc .fc-daygrid-event, .fc .fc-daygrid-event .fc-event-title { color: #fff; }
.fc .fc-day-today { background: #eef5ff !important; }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin: 0 2px 0 10px; }
.muted { color: var(--secondary-color); font-size: 0.9rem; white-space: pre-line; }

/* Tables */
#userTable, .reqTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}
#userTable th, #userTable td, .reqTable th, .reqTable td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
#userTable th, .reqTable th { background-color: var(--light-gray); font-weight: 700; }
.reqTable .actions { display: flex; gap: 8px; }
.reqTable .actions form, .delete-form { display: inline; background: none; padding: 0; box-shadow: none; }

/* Tags */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; }
.tag-move { background: #cfe2ff; color: #084298; }
.tag-swap { background: #e0cffc; color: #59359a; }
.tag-cancel { background: #f8d7da; color: #842029; }
.tag-approved { background: #d1e7dd; color: #0f5132; }
.tag-rejected { background: #f8d7da; color: #842029; }
.tag-pending { background: #fff3cd; color: #664d03; }
.tag-withdrawn { background: #e2e3e5; color: #41464b; }

/* Sections (users page) */
.form-section, .table-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }

/* Notifications */
.notif-list { list-style: none; padding: 0; }
.notif-list li {
    background: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 10px;
    border-left: 4px solid var(--border-color);
}
.notif-list li.notif-unread { border-left-color: var(--primary-color); background: #f0f7ff; }

/* Time clock */
.clock-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 16px;
    border-left: 5px solid var(--secondary-color);
}
.clock-card.clocked-in { border-left-color: var(--success-color); }
.clock-status { font-size: 1.15rem; margin-bottom: 14px; }
.clock-form { display: flex; gap: 10px; align-items: center; background: none; padding: 0; box-shadow: none; margin-bottom: 10px; flex-wrap: wrap; }
.clock-form input[type="text"] { margin-bottom: 0; max-width: 280px; }
.btn-clockin { background-color: var(--success-color); font-size: 1.05rem; padding: 12px 28px; }
.btn-clockin:hover { background-color: #1baa80; }
.btn-clockout { background-color: var(--danger-color); font-size: 1.05rem; padding: 12px 28px; }
.btn-clockout:hover { background-color: #bb2d3b; }
.filter-form { display: flex; gap: 10px; align-items: center; background: none; padding: 0; box-shadow: none; margin-bottom: 8px; }
.filter-form select { margin-bottom: 0; max-width: 260px; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal.modal-active { display: flex; }
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 560px;
    position: relative;
}
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}
.close-button:hover { color: #333; }
