.site-branding {
    margin: 5px 0 !important;
}

.main-navigation ul {
    margin: 5px 0 !important;
}

.main-navigation ul li {
    padding: 5px 10px !important;
    font-size: 14px !important;
}

.calendar-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    min-height: 1010px;
}

.header-top-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 10px;
    gap: 40px;
}

.today-button {
    order: 1;
}

.ontime-logo {
    order: 2;
    font-size: 1.8em;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #4169e1, #800080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

.ontime-logo::before {
    content: '📅';
    margin-right: 8px;
    font-size: 1.1em;
}

.header-button-group {
    order: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-button {
    padding: 8px 16px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #4169e1;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

#tools-button, #blop-button, #briefcase-button, #options-button {
    margin: 0;
}

#calendar-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

#calendar-header button {
    padding: 8px 16px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #4169e1;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

#calendar-header #prev-week {
    margin-left: 10px;
}

#calendar-header #next-week {
    margin-left: 25px;
}

#calendar-header #today-week {
    margin-left: 50px;
}

#calendar-header #add-appointment {
    margin-left: 50px;
}

#calendar-header #delete-appt {
    margin-left: 50px;
}

#calendar-header #prev-day {
    margin-left: 10px;
}

#calendar-header #next-day {
    margin-left: 25px;
}

#calendar-header #today-day {
    margin-left: 50px;
}

#calendar-header #prev-month {
    margin-left: 10px;
}

#calendar-header #next-month {
    margin-left: 25px;
}

#calendar-header #today-month {
    margin-left: 50px;
}

.view-button {
    background-color: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

#calendar-header .delete-appt {
    background-color: #ff0000;
    color: #ffffff;
    border: none;
}

#calendar-header .delete-appt:hover {
    background-color: #cc0000;
}

#calendar-header button:hover {
    background-color: #d3d3d3;
}

.view-button:hover {
    background-color: #2980b9;
}

.tools-menu {
    position: relative;
    display: inline-block;
}

#tools-dropdown, #briefcase-dropdown, #options-dropdown {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    top: 100%;
    left: 0;
    border: 1px solid #d3d3d3;
}

#tools-dropdown a, #briefcase-dropdown a, #options-dropdown a {
    color: #000000;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-family: Arial, sans-serif;
    font-size: 11px;
    border-bottom: 1px solid #f0f0f0;
}

#tools-dropdown a:hover, #briefcase-dropdown a:hover, #options-dropdown a:hover {
    background-color: #d3d3d3;
}

.tools-menu:hover #tools-dropdown,
.tools-menu:hover #briefcase-dropdown,
.tools-menu:hover #options-dropdown {
    display: block;
}

#current-day,
#current-week,
#current-month {
    font-size: 1.1em;
    margin: 0 35px;
    color: #00008b;
    font-family: Arial, sans-serif;
    white-space: nowrap;
    min-width: 300px;
    max-width: 300px;
    text-align: center;
    display: inline-block;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #4169e1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#calendar-pickers {
    display: flex;
    justify-content: center;
    gap: 75px;
    width: 100%;
    max-width: 1220px;
    margin: 20px 0 0;
    padding: 0;
}

#left-datepicker, #right-datepicker {
    margin: 0;
}

.mini-datepicker {
    width: 900px;
    height: 60px;
}

.ui-datepicker {
    font-family: 'Segoe UI', sans-serif;
    font-size: 10px;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: 900px !important;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.ui-datepicker-header {
    background: linear-gradient(45deg, #4169e1, #800080);
    color: #ffffff;
    border: none;
    border-radius: 5px 5px 0 0;
    padding: 5px;
}

.ui-datepicker-title {
    font-size: 11px;
    font-weight: bold;
}

.ui-datepicker-prev, .ui-datepicker-next {
    cursor: pointer;
    color: #ffffff;
    font-size: 12px;
}

.ui-datepicker-prev:hover, .ui-datepicker-next:hover {
    background-color: rgba(255,255,255,0.2);
}

.ui-datepicker-calendar {
    width: 775px !important;
    table-layout: fixed;
    margin: 0 auto;
}

.ui-datepicker-calendar td {
    padding: 2px;
    text-align: center;
    width: 110.71px;
}

.ui-datepicker-calendar th {
    width: 110.71px;
    font-size: 9px;
}

.ui-datepicker-calendar a {
    color: #000000;
    text-decoration: none;
    padding: 2px;
    border-radius: 3px;
    display: block;
}

.ui-datepicker-calendar a:hover {
    background-color: #d3d3d3;
}

.ui-datepicker-current-day a {
    background-color: #3498db;
    color: #ffffff;
}

.calendar-header {
    width: 100%;
    margin-left: 5px;
    padding-left: 5px;
    max-width: 1220px;
    margin-bottom: 0;
}

.calendar-container {
    width: 100%;
    max-width: 1220px;
    min-height: 600px;
    overflow-x: auto;
    margin: 0;
}

.calendar-grid-header, .calendar-grid {
    width: 1210px;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 0;
    table-layout: fixed;
}

.calendar-grid-header th, .calendar-grid td {
    border: 1px solid #000000;
    padding: 4px;
    text-align: left;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #000000;
    height: 6.5px;
    vertical-align: top;
    box-sizing: border-box;
}

.calendar-grid-header th {
    background-color: #d3d3d3;
    font-weight: bold;
    text-align: center;
}

.time-col {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

.appt-col {
    width: 755px !important;
    min-width: 755px !important;
    max-width: 755px !important;
}

.priority-col {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
}

.category-col {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
}

.recurrence-col {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
}

.note-col {
    width: 47px !important;
    min-width: 47px !important;
    max-width: 47px !important;
}

.blop-col {
    width: 47px !important;
    min-width: 47px !important;
    max-width: 47px !important;
}

.briefcase-col {
    width: 57px !important;
    min-width: 57px !important;
    max-width: 57px !important;
}

.delete-col {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center;
}

.calendar-grid .appointment {
    background-color: #add8e6;
    color: #000000;
    padding: 2px;
    cursor: pointer;
    font-size: 10px;
}

.calendar-grid .appointment:hover {
    background-color: #87ceeb;
}

.note-col, .blop-col {
    cursor: pointer;
}

.delete-checkbox {
    transform: scale(1.2);
    cursor: pointer;
    opacity: 1 !important;
    position: static !important;
    display: inline-block !important;
    margin: 0;
    vertical-align: middle;
    width: auto !important;
    height: auto !important;
}

.calendar-grid .delete-col .delete-checkbox {
    opacity: 1 !important;
    position: static !important;
    display: inline-block !important;
}

.weekly-grid-header, .weekly-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: fixed;
}

.weekly-grid-header th, .weekly-grid td {
    border: 1px solid #000000;
    padding: 4px;
    vertical-align: top;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #000000;
    box-sizing: border-box;
    height: 6.5px;
}

.weekly-grid-header th {
    background-color: #d3d3d3;
    font-weight: bold;
    text-align: center;
}

.time-col-weekly {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    background-color: #f5f5f5;
}

.day-col {
    background-color: #e8f4f8;
    text-align: center;
    width: calc((100% - 80px) / 7) !important;
    min-width: 140px !important;
}

.weekly-appointment {
    background-color: #add8e6;
    color: #000000;
    padding: 2px;
    margin: 1px 0;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    border-left: 3px solid #3498db;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.weekly-appointment:hover {
    background-color: #87ceeb;
}

.has-appointment {
    background-color: #f0f8ff;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    width: 900px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close, .close-note, .close-delete, .close-blop, .close-briefcase, .close-briefcase-edit, .close-delete-options {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover, .close-delete-options:hover {
    color: #000;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.form-group.full-width {
    flex: 0 0 100%;
    max-width: 400px;
}

.form-group textarea {
    width: 400px;
    resize: vertical;
    font-size: 18px;
}

#appointment-form label, #note-form label, #delete-form label, #delete-options-modal label {
    display: block;
    margin: 5px 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #00008b;
}

#appointment-form input, #appointment-form select, #note-form input, #note-form textarea, #delete-form input,
#delete-options-modal input, #delete-options-modal select {
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    box-sizing: border-box;
}

#note-form textarea {
    width: 400px;
    height: 100px;
    font-size: 18px;
}

#appointment-form input[type="date"], #delete-start-date, #delete-end-date {
    position: relative;
}

#appointment-form button, #note-form button, #delete-form button, #delete-options-modal button {
    background-color: #3498db;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12px;
    margin: 5px;
}

#appointment-form button:hover, #note-form button:hover, #delete-form button:hover, #delete-options-modal button:hover {
    background-color: #2980b9;
}

#delete-form .cancel-delete, #confirm-period-delete, #confirm-recurrence-delete, #confirm-all-delete {
    background-color: #ff4444;
}

#delete-form .cancel-delete:hover, #confirm-period-delete:hover, #confirm-recurrence-delete:hover, #confirm-all-delete:hover {
    background-color: #cc0000;
}

#delete-form .cancel-delete {
    background-color: #d3d3d3;
    color: #000000;
}

#delete-form .cancel-delete:hover {
    background-color: #b0b0b0;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #d3d3d3;
    margin-bottom: 20px;
}

.tab-link {
    background-color: #ffffff;
    border: 1px solid #d3d3d3;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12px;
    margin-right: 5px;
}

.tab-link.active {
    background-color: #3498db;
    color: #ffffff;
}

.tab-link:hover {
    background-color: #d3d3d3;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#blop-list, #briefcase-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d3d3d3;
    padding: 10px;
    margin-bottom: 10px;
}

#blop-list div, #briefcase-list div {
    padding: 5px;
    cursor: pointer;
}

#blop-list div:hover, #briefcase-list div:hover {
    background-color: #d3d3d3;
}

#blop-list div.selected, #briefcase-list div.selected {
    background-color: #3498db;
    color: #ffffff;
}

#file-list, #edit-file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d3d3d3;
    padding: 10px;
    margin-top: 10px;
}

#delete-results {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

#delete-results.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#delete-results.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#period-preview, #recurrence-preview, #all-preview {
    margin: 10px 0;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

#confirm-all-delete {
    background-color: #ff0000 !important;
    font-weight: bold;
    font-size: 14px;
}

.ocp-clock {
    width: 100px;
    height: 50px;
    background: linear-gradient(135deg, #4169e1, #800080);
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

.ocp-clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 40%);
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-50%) rotate(45deg); }
    100% { transform: translateX(50%) rotate(45deg); }
}

/* Monthly View Styles */
.monthly-grid-header, .monthly-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: fixed;
    margin: 0 auto;
    max-width: 1220px;
}

.monthly-grid-header th, .monthly-grid td {
    border: 1px solid #000000;
    padding: 2px;
    vertical-align: top;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #000000;
    box-sizing: border-box;
    height: 120px;
    width: calc(100% / 7);
    min-width: 120px;
}

.monthly-grid-header th {
    background-color: #d3d3d3;
    font-weight: bold;
    text-align: center;
    height: 30px;
    font-size: 12px;
}

.month-day {
    position: relative;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s ease;
}

.month-day.current-month {
    background-color: #ffffff;
}

.month-day.other-month {
    background-color: #f0f0f0;
    color: #999;
}

.month-day:hover {
    background-color: #e8f4f8 !important;
}

.month-day.has-appointments {
    background-color: #f0f8ff;
}

.month-day.has-appointments:hover {
    background-color: #d0e8f5 !important;
}

.day-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-weight: bold;
    font-size: 12px;
    color: #333;
    z-index: 10;
}

.appointments-container {
    position: absolute;
    top: 20px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    overflow-y: auto;
    padding-right: 2px;
}

.monthly-appointment {
    background-color: #add8e6;
    color: #000000;
    padding: 2px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 9px;
    cursor: pointer;
    border-left: 2px solid #3498db;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    max-width: 100%;
}

.monthly-appointment:hover {
    background-color: #87ceeb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 20;
}

.monthly-appointment[data-id] {
    position: relative;
}

.more-appts {
    background-color: #95a5a6;
    color: #ffffff;
    padding: 1px 4px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 8px;
    text-align: center;
    cursor: default;
}

.month-day.has-appointments:hover .delete-checkbox,
.month-day.has-appointments .delete-checkbox:checked {
    opacity: 1;
}

.month-day.selected {
    background-color: #3498db !important;
    color: #ffffff;
}

.month-day.selected .day-number {
    color: #ffffff;
}

.month-day.selected .monthly-appointment {
    background-color: #2980b9;
    color: #ffffff;
}

.month-day.selected .more-appts {
    background-color: #7f8c8d;
}

/* Monthly view responsive adjustments */
@media (max-width: 768px) {
    .monthly-grid td {
        height: 80px;
        min-width: 40px;
        font-size: 10px;
    }
    
    .monthly-appointment {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .day-number {
        font-size: 11px;
    }
}

/* Appointment modal enhancements for monthly view */
#appointment-modal .modal-content {
    width: 95%;
    max-width: 800px;
}

#appointment-date {
    background-color: #fff3cd;
    font-weight: bold;
}