/* Custom CSS for Staff Shift Management System */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
}

.footer {
    margin-top: auto;
}

/* Card Styles */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 4px;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Form Styles */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Calendar Styles */
.calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
}

.calendar th {
    background-color: #f8f9fa;
    text-align: center;
    padding: 10px;
    font-weight: 600;
}

.calendar td {
    border: 1px solid #dee2e6;
    height: 100px;
    width: 14.28%;
    vertical-align: top;
    padding: 5px;
    background-color: #fff;
}

.calendar td.not-in-month {
    background-color: #f8f9fa;
    color: #aaa;
}

.calendar .day-number {
    font-weight: 600;
    margin-bottom: 5px;
    text-align: right;
}

.calendar .available {
    background-color: #d1e7dd;
}

.calendar .unavailable {
    background-color: #f8d7da;
}

.calendar .has-shift {
    background-color: #cfe2ff;
}

.calendar .disabled {
    background-color: #e9ecef;
    color: #aaa;
}

/* Clickable calendar cells */
.calendar td.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar td.clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1;
    position: relative;
}

.calendar td.clickable:active {
    transform: scale(0.98);
}

.calendar .availability-status {
    margin-top: 10px;
    margin-bottom: 10px;
}

.calendar .shift-item {
    font-size: 0.8rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    background-color: #0d6efd;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Widgets */
.dashboard-widget {
    height: 100%;
    transition: transform 0.2s;
}

.dashboard-widget:hover {
    transform: translateY(-5px);
}

.dashboard-widget .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 15px;
}

.dashboard-widget .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #0d6efd;
}

.dashboard-widget .count {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-widget .title {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Shift List */
.shift-list {
    list-style: none;
    padding: 0;
}

.shift-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.shift-list li:last-child {
    border-bottom: none;
}

.shift-list .shift-time {
    font-weight: 600;
}

.shift-list .shift-location {
    color: #6c757d;
}

/* Availability Toggle */
.availability-toggle {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.availability-toggle .btn {
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* Statistics */
.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.stat-card .stat-label {
    font-size: 1rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 50px auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 150px;
}

/* Mobile Responsiveness */
@media (max-width: 767.98px) {
    .calendar td {
        height: 60px;
        padding: 2px;
    }
    
    .calendar .day-number {
        font-size: 0.9rem;
    }
    
    .calendar .shift-item {
        font-size: 0.7rem;
        padding: 1px 2px;
    }
    
    .dashboard-widget .icon {
        font-size: 2rem;
    }
    
    .dashboard-widget .count {
        font-size: 1.5rem;
    }
    
    .dashboard-widget .title {
        font-size: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .calendar td {
        border: 1px solid #000;
    }
}