* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* Header */
header {
    background: #222;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    background: #444;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #555;
}

/* Sections */
section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section h2 {
    font-size: 20px;
    margin-bottom: 18px;
    border-bottom: 2px solid #222;
    padding-bottom: 8px;
}

/* Status Display (MTA-style) */
.status-display {
    background: #222;
    color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

.status-text {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-text span {
    display: inline-block;
    animation: scrollText 2s ease-in-out infinite;
}

@keyframes scrollText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Schedule List */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-item {
    padding: 12px;
    border-left: 4px solid #ccc;
    background: #f9f9f9;
    border-radius: 4px;
}

.schedule-time {
    font-weight: bold;
    color: #555;
    font-size: 14px;
    margin-bottom: 4px;
}

.schedule-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.schedule-desc {
    font-size: 14px;
    color: #666;
}

.overnight-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #9A38A1;
    color: white;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 600;
}

.schedule-item.overnight {
    background: linear-gradient(to right, #f9f9f9 0%, #f0e8f4 100%);
}

.no-schedule, .no-work {
    color: #999;
    font-style: italic;
    padding: 10px 0;
}

/* Public Work */
.work-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #0062CF;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.work-title {
    font-size: 16px;
    font-weight: 600;
}

.work-category {
    font-size: 12px;
    padding: 3px 8px;
    background: #222;
    color: white;
    border-radius: 3px;
    text-transform: uppercase;
}

.work-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.work-meta {
    font-size: 12px;
    color: #999;
}

/* Calendar Grid */
#calendarGrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: #e9e9e9;
    transform: scale(1.05);
}

.calendar-day.today {
    border-color: #222;
    background: #fff;
}

.calendar-day.has-schedule {
    background: #e8f4f8;
}

.calendar-day-number {
    font-size: 18px;
    font-weight: bold;
}

.calendar-day-name {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.calendar-day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

#modalSchedule .schedule-item {
    margin-top: 12px;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.login-container h1 {
    margin-bottom: 25px;
    text-align: center;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.login-container button {
    padding: 12px;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.login-container button:hover {
    background: #333;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
}

.back-link:hover {
    color: #222;
}

/* Admin Dashboard */
.admin-body {
    background: #f0f0f0;
}

.admin-header {
    background: #1a1a1a;
}

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

.admin-header nav a {
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    background: #333;
    border-radius: 4px;
    font-size: 14px;
}

.admin-header nav a:hover {
    background: #444;
}

.admin-main {
    padding: 20px;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-form {
    background: #fafafa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.admin-form h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.admin-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.admin-form .form-row.full-width {
    grid-template-columns: 1fr;
}

.admin-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.admin-form textarea {
    min-height: 60px;
    resize: vertical;
}

.admin-form button {
    padding: 12px 20px;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.admin-form button:hover {
    background: #333;
}

.admin-form .btn-primary {
    background: #0062CF;
}

.admin-form .btn-primary:hover {
    background: #0052af;
}

.quick-tips {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-left: 4px solid #0062CF;
    border-radius: 4px;
}

.quick-tips strong {
    display: block;
    margin-bottom: 8px;
    color: #0062CF;
}

.quick-tips ul {
    margin: 0;
    padding-left: 20px;
}

.quick-tips li {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

.admin-list table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-list th,
.admin-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-list th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 14px;
}

.admin-list td {
    font-size: 14px;
}

.edit-btn {
    padding: 6px 12px;
    background: #0062CF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.edit-btn:hover {
    background: #0052af;
}

.delete-btn {
    padding: 6px 12px;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.delete-btn:hover {
    background: #d32f2f;
}

.btn-secondary {
    padding: 12px 20px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #777;
}

.color-box {
    width: 30px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-daily {
    background: #9A38A1;
    color: white;
}

.badge-weekly {
    background: #0062CF;
    color: white;
}

.badge-specific {
    background: #EB6800;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    #calendarGrid {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 14px;
    }
    
    .calendar-day-name {
        font-size: 9px;
    }
    
    .admin-form form {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        font-size: 12px;
    }
    
    .status-text {
        font-size: 18px;
    }
}
