:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --error-color: #c0392b;
    --light-gray: #ecf0f1;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

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

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.main-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-radius: 8px;
}

.main-header h1 {
    margin: 0;
    font-size: 1.5em;
    text-align: left;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-item {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-block;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: white;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.nav-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1000px) {
    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dept-grid {
        grid-template-columns: 1fr;
    }
}

.shifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.shift-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--accent-color);
    transition: transform 0.2s;
    cursor: pointer;
}

.shift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.shift-card.full {
    border-left-color: var(--error-color);
    opacity: 0.7;
    cursor: default;
}

.shift-card.available {
    border-left-color: var(--success-color);
}

.shift-card.booked-by-me {
    background-color: #e8f5e9;
    border-color: #4caf50;
    cursor: default;
}

.dept-row {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    border-left: 5px solid transparent;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.dept-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Admin Navigation */
.admin-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5em;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.page-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.action-tiles {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.action-tile {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
    transition: all 0.2s;
    cursor: pointer;
}

.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.action-tile svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.shift-helpers {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 4px;
}

/* Cursor handling */
.shift-card[data-action="book"],
.shift-card[data-action="login"] {
    cursor: pointer;
}

.shift-card[data-action="none"] {
    cursor: default;
    opacity: 0.8;
}

.shift-time {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.shift-details {
    margin-bottom: 15px;
}

.department {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.task {
    display: block;
    font-size: 1.1em;
    margin-top: 5px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    color: white;
}

.badge.success {
    background-color: var(--success-color);
}

.badge.error {
    background-color: var(--error-color);
}

/* 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);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    /* Fix padding issue */
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.dept-section {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
}

.dept-section h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 10px;
    }

    .main-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        gap: 10px;
    }

    .hamburger {
        display: flex;
    }

    .user-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 10px;
        order: 3;
    }

    .user-nav.show {
        display: flex;
    }

    .nav-item {
        display: block;
        text-align: center;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .shifts-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    /* Admin Header Mobile */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .admin-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 10px;
        background: #f8f9fa;
        margin-bottom: 5px;
    }

    /* Action Tiles Mobile */
    .action-tiles {
        flex-direction: column;
    }

    .action-tile {
        width: 100%;
        box-sizing: border-box;
    }

    /* Modals Mobile */
    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 20px;
    }

    /* Table Scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* Force scroll on small screens */
    }
}