/* ===========================================
   PINTO STYLESHEET — TABLE OF CONTENTS
   ===========================================
    1.  RESET & BASE
    2.  TOP BAR
    3.  SIDEBAR
    4.  RESPONSIVE NAV
    5.  LAYOUT
    6.  CARDS & SECTIONS
    7.  BUTTONS
    8.  FORMS
    9.  TABLES
   10.  MODALS
   11.  CALENDAR
   12.  CALENDAR HEADER CONTROLS
   13.  WEEKLY CALENDAR
   14.  JOB BLOCKS — SHARED STYLES
   15.  WEEKLY JOB BLOCKS
   16.  DAILY JOB BLOCKS
   17.  DAILY CALENDAR UPDATES
   18.  RESPONSIVE STYLES
   19.  SCHEDULE MODAL ENHANCEMENTS
   20.  INVOICES
   21.  SETTINGS
   22.  FORM VALIDATION
   23.  ARCHIVE & ACTIONS
   24.  DETAILS VIEW
   25.  SETTINGS — DAY CONFIG
   26.  STICKY HEADER
   27.  PAGINATION & SEARCH
   28.  DASHBOARD
   =========================================== */

/* ===================
   RESET & BASE
   =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

/* ===================
   TOP BAR
   =================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
}

.top-bar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.top-bar .logo img {
    height: 54px;
}

.top-bar .logo-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

/* Top bar actions (right side) */
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Top bar menu (right side) */
.top-bar-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Global search */
.global-search {
    position: relative;
}

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #555;
    font-size: 1.15rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.search-toggle:hover {
    background: #f0f0f0;
    color: #333;
}

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    padding-top: 80px;
    justify-content: center;
    align-items: flex-start;
}

.search-overlay.open {
    display: flex;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #888;
    border-bottom: 1px solid #eee;
}

.search-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: #333;
}

.search-input::placeholder {
    color: #aaa;
}

.search-shortcut {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #888;
    font-family: inherit;
    flex-shrink: 0;
}

.search-box {
    background: #fff;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background 0.1s;
    gap: 0.75rem;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.active {
    background: #f5f7ff;
}

.search-result-type {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 56px;
    text-align: center;
}

.search-result-type.client { background: #e8f5e9; color: #2e7d32; }
.search-result-type.vehicle { background: #e3f2fd; color: #1565c0; }
.search-result-type.job { background: #fff3e0; color: #e65100; }
.search-result-type.invoice { background: #f3e5f5; color: #7b1fa2; }
.search-result-type.staff { background: #fce4ec; color: #c62828; }

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.search-loading {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #aaa;
    font-size: 0.85rem;
}

.nav-user-name {
    font-size: 0.9rem;
    color: #555;
}

/* Menu toggle button (3 horizontal lines) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.menu-toggle:hover {
    background: #f0f0f0;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

/* Menu dropdown */
.menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1002;
    overflow: hidden;
}

.top-bar-menu.open .menu-dropdown {
    display: block;
}

.menu-dropdown a,
.menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.menu-dropdown a:hover,
.menu-dropdown button:hover {
    background: #f5f5f5;
    color: #3498db;
}

.menu-dropdown form {
    margin: 0;
    border-top: 1px solid #eee;
}

/* ===================
   SIDEBAR
   =================== */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    z-index: 999;
}

.sidebar ul {
    list-style: none;
    padding: 0.5rem 0;
}

.sidebar li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar li a:hover {
    background: #f0f7ff;
    color: #3498db;
}

.sidebar li a.active {
    color: #3498db;
    font-weight: 600;
    background: #f0f7ff;
    border-left: 3px solid #3498db;
}

/* ===================
   RESPONSIVE NAV
   =================== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    main.with-sidebar {
        margin-left: 0;
    }

    .nav-user-name {
        display: none;
    }
}

/* ===================
   LAYOUT
   =================== */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

main.with-sidebar {
    max-width: none;
    margin-left: 220px;
    margin-top: 70px;
    padding: 2rem 4rem;
}

/* Pages without sidebar (login, etc) */
main:not(.with-sidebar) {
    margin-top: 70px;
}

h1 {
    margin-bottom: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-header h1 {
    margin: 0;
}

/* ===================
   CARDS & SECTIONS
   =================== */
.card,
.settings-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card h2,
.settings-section h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* ===================
   BUTTONS
   =================== */
/* Base button styles - applied to all button types */
button,
.btn,
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-block;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s, transform 0.1s;
}

/* Default button (gray) */
button,
.btn {
    background: #6c757d;
    color: white;
}

button:hover,
.btn:hover {
    background: #5a6268;
}

/* Primary button (blue) */
.btn-primary {
    background: #3498db;
    color: white;
}

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

/* Secondary button (light gray) */
.btn-secondary {
    background: #e9ecef;
    color: #333;
}

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

/* Danger button (red) */
.btn-danger {
    background: #c0392b;
    color: white;
}

.btn-danger:hover {
    background: #a93226;
}

/* Small button variant */
.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* ===================
   FORMS
   =================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

/* Search Input with Dropdown */
.search-input-container {
    position: relative;
}

.search-input-container input {
    width: 100%;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: #f5f5f5;
}

.search-dropdown-title {
    font-weight: bold;
    color: #333;
}

.search-dropdown-sub {
    font-size: 0.85rem;
    color: #666;
}

.search-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: #999;
}

.search-dropdown-add {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.search-dropdown-add:hover {
    background: #e9ecef;
}

.search-dropdown-add .search-dropdown-title {
    color: #3498db;
}

/* New Vehicle Section */
.new-vehicle-section {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.new-vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.new-vehicle-header h4 {
    margin: 0;
    color: #333;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
    background: none;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.required {
    color: #c00;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    width: auto;
    margin: 0;
}

.radio-item span {
    cursor: pointer;
}

/* ===================
   TABLES
   =================== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f5f5f5;
    font-weight: bold;
}

tbody tr:hover {
    background: #e8f4fc;
}

tr[onclick] {
    cursor: pointer;
}

table a {
    color: #3498db;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

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

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* ===================
   CALENDAR
   =================== */
.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header-bar h1 {
    margin: 0;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav a {
    color: #333;
    text-decoration: none;
}

.calendar-nav a:hover {
    text-decoration: underline;
}

.calendar-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-grid {
    min-width: 100%;
}

.calendar-header {
    display: flex;
    border-bottom: 2px solid #333;
}

.calendar-time-col {
    width: 50px;
    min-width: 50px;
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    color: #666;
}

.calendar-day-col {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.calendar-bay-col {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.calendar-body {
    position: relative;
}

.calendar-row {
    display: flex;
    border-bottom: 1px solid #eee;
    min-height: 50px;
}

.calendar-cell {
    flex: 1;
    border-left: 1px solid #eee;
    position: relative;
    min-height: 50px;
}

.calendar-slots {
    display: flex;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.calendar-slot {
    flex: 1;
    position: relative;
}

.calendar-job {
    position: absolute;
    left: 1px;
    right: 1px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    color: white;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.calendar-job:hover {
    opacity: 0.9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.calendar-job strong {
    font-size: 0.7rem;
}

.calendar-job span {
    font-size: 0.6rem;
    opacity: 0.9;
}

/* Second .calendar-wrapper removed — merged into the first definition above */

/* Daily Calendar */
.daily-calendar {
    position: relative;
    display: flex;
    flex-direction: column;
}

.daily-calendar .calendar-header {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 30;
}

.daily-calendar .calendar-scroll {
    max-height: 600px;
    overflow-y: auto;
}

.daily-calendar .calendar-body {
    position: relative;
}

.daily-calendar .calendar-row {
    height: 30px;
    min-height: 30px;
    display: flex;
}

.daily-calendar .calendar-row.hour-start {
    border-top: 1px solid #ccc;
}

.daily-calendar .calendar-row.half-hour {
    border-top: 1px dashed #e0e0e0;
}

.daily-calendar .calendar-cell {
    flex: 1;
    height: 30px;
    min-height: 30px;
    border-right: 1px solid #e8e8e8;
    cursor: pointer;
    transition: background-color 0.1s;
}

.daily-calendar .calendar-cell:hover {
    background: rgba(52, 152, 219, 0.15);
}

.daily-calendar .calendar-cell.selected {
    background: rgba(52, 152, 219, 0.3);
    box-shadow: inset 0 0 0 2px #3498db;
}

.daily-calendar .calendar-time-col {
    width: 50px;
    min-width: 50px;
    height: 30px;
    display: flex;
    align-items: flex-start;
    font-weight: bold;
    font-size: 0.7rem;
    color: #666;
    padding-right: 0.5rem;
    justify-content: flex-end;
    margin-top: -8px;
}

/* Bay columns overlay */
.bay-columns {
    position: absolute;
    top: 0;
    left: 50px;
    right: 0;
    bottom: 0;
    display: flex;
    pointer-events: none;
    z-index: 5;
}

.bay-column {
    flex: 1;
    position: relative;
    pointer-events: none;
}

/* Job cards */
.daily-calendar .calendar-job {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    overflow: hidden;
    line-height: 1.3;
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

.daily-calendar .calendar-job:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 20;
}

.daily-calendar .job-time {
    font-size: 0.6rem;
    font-weight: bold;
    opacity: 0.9;
    white-space: nowrap;
}

.daily-calendar .job-rego {
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.daily-calendar .job-vehicle {
    font-size: 0.65rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.daily-calendar .job-mechanic {
    font-size: 0.6rem;
    font-style: italic;
    opacity: 0.9;
    white-space: nowrap;
}

.daily-calendar .job-items {
    font-size: 0.55rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Job status colours defined in JOB BLOCKS - SHARED STYLES section below */

/* Working hours - light blue background */
.working-hour .calendar-cell {
    background: #f8fbff;
}

.working-hour .calendar-cell:hover {
    background: rgba(52, 152, 219, 0.2);
}

/* Non-working hours - greyed out */
.non-working-hour .calendar-cell {
    background: #f0f0f0;
}

.non-working-hour .calendar-cell:hover {
    background: #e0e0e0;
}

.non-working-hour .calendar-time-col {
    color: #aaa;
}

/* ===================
   CALENDAR HEADER CONTROLS
   =================== */
.calendar-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggle Button Group */
.view-toggle {
    display: flex;
    border: 2px solid #333;
    border-radius: 4px;
    overflow: hidden;
}

.view-toggle .view-btn {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border-right: 2px solid #333;
    transition: all 0.2s;
}

.view-toggle .view-btn:last-child {
    border-right: none;
}

.view-toggle .view-btn:hover {
    background: #f0f0f0;
}

.view-toggle .view-btn.active {
    background: #333;
    color: white;
}

/* Navigation Arrows & Date Display */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.calendar-nav a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.calendar-nav a:hover {
    background: #e8f4fc;
}

.calendar-nav span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* ===================
   WEEKLY CALENDAR
   =================== */
.weekly-calendar {
    position: relative;
    display: flex;
    flex-direction: column;
}

.weekly-calendar .calendar-header.weekly-header {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #333;
    position: sticky;
    top: 0;
    z-index: 30;
    min-width: 1200px;
}

.weekly-calendar .calendar-time-col {
    width: 50px;
    min-width: 50px;
    padding: 0.5rem 0.25rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}

/* Day Group Headers */
.calendar-day-group {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #333;
}

.calendar-day-group.today {
    background: rgba(52, 152, 219, 0.08);
}

.calendar-day-group .day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day-group .day-header:hover {
    background: rgba(52, 152, 219, 0.15);
}

.calendar-day-group .day-name {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.calendar-day-group .day-num {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

.calendar-day-group.today .day-num {
    background: #3498db;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bay Headers */
.bay-headers {
    display: flex;
    border-top: 1px solid #ddd;
}

.bay-header {
    flex: 1;
    min-width: 45px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #666;
    padding: 0.3rem 0;
    border-left: 1px solid #e0e0e0;
    background: #fafafa;
}

.bay-header:first-child {
    border-left: none;
}

/* Weekly Calendar Body */
.weekly-calendar .calendar-scroll {
    max-height: 650px;
    overflow-y: auto;
    overflow-x: auto;
}

.weekly-calendar .calendar-body.weekly-body {
    position: relative;
    min-width: 1200px;
}

/* Weekly Rows - 30px tall (1px per minute) */
.weekly-calendar .calendar-row {
    display: flex;
    height: 30px;
    min-height: 30px;
}

.weekly-calendar .calendar-row.hour-start {
    border-top: 1px solid #bbb;
}

.weekly-calendar .calendar-row.half-hour {
    border-top: 1px dashed #ddd;
}

.weekly-calendar .calendar-row .calendar-time-col {
    width: 50px;
    min-width: 50px;
    height: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    padding-right: 0.4rem;
    margin-top: -8px;
}

/* Day Cells Container */
.calendar-day-cells {
    flex: 1;
    min-width: 180px;
    display: flex;
    border-left: 2px solid #333;
}

/* Weekly Cells */
.weekly-calendar .calendar-cell.weekly-cell {
    flex: 1;
    min-width: 45px;
    height: 30px;
    min-height: 30px;
    border-right: 1px solid #e8e8e8;
    cursor: pointer;
    transition: background-color 0.15s;
}

.weekly-calendar .calendar-cell.weekly-cell:last-child {
    border-right: none;
}

.weekly-calendar .calendar-cell.weekly-cell:hover {
    background: rgba(52, 152, 219, 0.2);
}

.weekly-calendar .calendar-cell.weekly-cell.selected {
    background: rgba(52, 152, 219, 0.35);
    box-shadow: inset 0 0 0 2px #3498db;
}

/* Weekly Working/Non-Working Hours - applied per day-cells */
.weekly-calendar .calendar-day-cells.working-hour {
    background: #e8f4fc;
}

.weekly-calendar .calendar-day-cells.non-working-hour {
    background: #f5f5f5;
}

/* Week Columns Overlay for Jobs */
.week-columns {
    position: absolute;
    top: 0;
    left: 50px;
    right: 0;
    bottom: 0;
    display: flex;
    pointer-events: none;
    z-index: 5;
}

.day-column {
    flex: 1;
    min-width: 180px;
    position: relative;
    display: flex;
    border-left: 2px solid #333;
}

.weekly-bay {
    flex: 1;
    min-width: 45px;
    position: relative;
}

/* ===================
   JOB BLOCKS - SHARED STYLES
   =================== */
.calendar-job {
    border: 2px solid #000;
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}

.calendar-job:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

/* Job Status Colors */
.calendar-job.job-scheduled {
    background: #3498db;
    color: white;
}

.calendar-job.job-in_progress {
    background: #f39c12;
    color: white;
}

.calendar-job.job-completed {
    background: #27ae60;
    color: white;
}

.calendar-job.job-cancelled {
    background: #95a5a6;
    color: white;
}

.calendar-job.job-cancelled .job-rego,
.calendar-job.job-cancelled .job-vehicle {
    text-decoration: line-through;
}

/* ===================
   WEEKLY JOB BLOCKS
   =================== */
.weekly-calendar .calendar-job.weekly-job {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 3px 4px;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
    min-height: 24px;
}

.weekly-calendar .calendar-job.weekly-job:hover {
    z-index: 20;
}

.weekly-calendar .weekly-job .job-rego {
    font-size: 0.65rem;
    font-weight: bold;
    white-space: normal;
    word-break: break-all;
    max-width: 100%;
    line-height: 1.1;
}

.weekly-calendar .weekly-job .job-time-short {
    font-size: 0.6rem;
    opacity: 0.9;
    line-height: 1.2;
}

/* No Bay Jobs Indicator */
.weekly-calendar .no-bay-job {
    position: absolute;
    right: 3px;
    left: auto;
    width: 10px;
    padding: 0;
    opacity: 0.8;
    border-radius: 3px;
}

.weekly-calendar .no-bay-job .job-rego,
.weekly-calendar .no-bay-job .job-time-short {
    display: none;
}

/* ===================
   DAILY JOB BLOCKS
   =================== */
.daily-calendar .calendar-job {
    position: absolute;
    left: 3px;
    right: 3px;
    padding: 6px 8px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto;
}

.daily-calendar .calendar-job:hover {
    z-index: 20;
}

.daily-calendar .job-time {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
    margin-bottom: 2px;
}

.daily-calendar .job-rego {
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.2;
}

.daily-calendar .job-vehicle {
    font-size: 0.7rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.daily-calendar .job-mechanic {
    font-size: 0.65rem;
    font-style: italic;
    opacity: 0.9;
    white-space: nowrap;
}

.daily-calendar .job-items {
    font-size: 0.6rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 2px;
}

/* ===================
   DAILY CALENDAR UPDATES
   =================== */
.daily-calendar .calendar-row {
    height: 30px;
    min-height: 30px;
}

.daily-calendar .calendar-cell {
    height: 30px;
    min-height: 30px;
}

.daily-calendar .calendar-time-col {
    height: 30px;
}

/* Daily Working Hours */
.daily-calendar .working-hour .calendar-cell {
    background: #e8f4fc;
}

.daily-calendar .working-hour .calendar-cell:hover {
    background: rgba(52, 152, 219, 0.25);
}

.daily-calendar .non-working-hour .calendar-cell {
    background: #f5f5f5;
}

.daily-calendar .non-working-hour .calendar-cell:hover {
    background: #e8e8e8;
}

/* ===================
   RESPONSIVE STYLES
   =================== */
@media (max-width: 1400px) {
    .weekly-calendar .calendar-header.weekly-header,
    .weekly-calendar .calendar-body.weekly-body {
        min-width: 1000px;
    }

    .calendar-day-group,
    .day-column,
    .calendar-day-cells {
        min-width: 150px;
    }

    .weekly-bay,
    .weekly-calendar .calendar-cell.weekly-cell,
    .bay-header {
        min-width: 37px;
    }
}

@media (max-width: 768px) {
    .calendar-header-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }

    .view-toggle .view-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .calendar-nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .calendar-nav span {
        order: -1;
        font-size: 1rem;
    }

    /* Daily view adjustments */
    .daily-calendar .calendar-bay-col {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

/* ===================
   SCHEDULE MODAL ENHANCEMENTS
   =================== */

/* Pre-filled schedule info display */
.prefilled-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #e8f4fc;
    border: 2px solid #3498db;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.prefilled-badge {
    background: #3498db;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.prefilled-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.prefilled-details span {
    font-weight: 600;
    color: #333;
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 3px;
    font-size: 0.9rem;
}

.prefilled-info .btn-link {
    color: #3498db;
    font-size: 0.85rem;
}

/* Duration input wrapper */
.duration-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.duration-input-wrapper input {
    flex: 1;
}

.auto-indicator {
    background: #27ae60;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ===================
   INVOICES
   =================== */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.invoice-header h1 {
    margin: 0;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

.invoice-layout {
    display: grid;
    gap: 1rem;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}
.status-clickable {
    cursor: pointer;
    user-select: none;
}
.status-clickable:hover {
    opacity: 0.8;
}

.status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-partially_paid {
    background: #fff3cd;
    color: #856404;
}

.status-overdue {
    background: #f5c6cb;
    color: #721c24;
}

.status-scheduled {
    background: #d1ecf1;
    color: #0c5460;
}

.status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.add-item-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.add-item-form select,
.add-item-form input {
    padding: 0.5rem;
    width: auto;
}

.invoice-items {
    width: 100%;
}

.service-tasks {
    margin: 0.25rem 0 0 1rem;
    padding: 0;
    font-size: 0.85rem;
    color: #666;
}

.service-tasks li {
    list-style: disc;
}

.remove-link {
    color: #c00;
    text-decoration: none;
    font-size: 1.25rem;
}

.labour-form .form-row {
    align-items: flex-end;
}

.invoice-totals table {
    margin-left: auto;
    width: auto;
}

.invoice-totals td {
    padding: 0.5rem 1rem;
    text-align: right;
}

.invoice-totals .total-row {
    border-top: 2px solid #333;
    font-size: 1.1rem;
}

/* ===================
   SETTINGS
   =================== */
.settings-links {
    list-style: none;
}

.settings-links li {
    margin-bottom: 0.5rem;
}

.settings-links a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.settings-links a:hover {
    text-decoration: underline;
}

/* ===================
   FORM VALIDATION
   =================== */
.field-error {
    color: #c00;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

.input-error {
    border-color: #c00 !important;
}

/* ===================
   ARCHIVE & ACTIONS
   =================== */
.page-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-archived {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.archived-row {
    opacity: 0.5;
    background: #f9f9f9;
}

.delete-link {
    color: #c00 !important;
}

/* ===================
   DETAILS VIEW
   =================== */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 1rem;
    line-height: 1;
}

.alert-close:hover {
    opacity: 0.7;
}

.flash-messages {
    margin-bottom: 1rem;
}


/* ===================
   SETTINGS - DAY CONFIG
   =================== */
.day-config {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f9f9f9;
}

.day-header {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label strong {
    font-size: 1.1rem;
    color: #333;
}

/* ===================
   STICKY HEADER
   =================== */
.sticky-header {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.sticky-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sticky-header-top h1 {
    margin: 0;
}

.sticky-header h1 {
    margin: 0 0 1rem 0;
}

.sticky-header .table-search-form {
    margin: 0;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sticky-header + .card {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-top: 0;
}

.sticky-header + .card thead th {
    position: sticky;
    top: 0;
    background-color: #f5f5f5 !important;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #ddd;
}

.sticky-header + .card thead {
    position: relative;
    z-index: 11;
}

.header-search {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 250px;
}

.header-search:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.header-filter {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.header-filter:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.header-controls .btn-primary {
    margin-left: auto;
}

/* ===================
   PAGINATION & SEARCH
   =================== */

/* Search form */
.table-search-form {
    margin-bottom: 1rem;
}

.search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-wrapper {
    min-width: 150px;
}

.filter-select {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-btn {
    padding: 0.5rem 1.5rem;
}

.clear-btn {
    padding: 0.5rem 1rem;
}

/* Sortable headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.sortable a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

th.sortable:hover {
    background: #e8e8e8;
}

th.sortable.sorted {
    background: #e3f2fd;
}

.sort-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

.sort-icon.inactive {
    opacity: 0.3;
    font-size: 0.6rem;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: #f0f0f0;
    border-color: #ccc;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0.4rem 0.5rem;
    color: #999;
}

/* File Upload Styling */
.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.current-file-preview {
    margin-bottom: 0.5rem;
}

.logo-preview {
    max-width: 150px;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    background: #f9f9f9;
}

.current-file-name {
    color: #666;
    font-size: 0.85rem;
}

.no-preview {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s;
}

.file-input-label:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.file-name {
    font-size: 0.85rem;
    color: #27ae60;
    font-weight: 500;
}

/* Settings Page Layout */
.settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-top: 1rem;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 86px;  /* Clear the fixed 70px top bar + margin */
}

.settings-sidebar ul.settings-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    display: block;
    flex-direction: column;
    gap: 0;
}

.settings-nav li {
    display: block;
    border-bottom: 1px solid #eee;
}

.settings-nav li:last-child {
    border-bottom: none;
}

.settings-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.settings-nav-link:hover {
    background: #f5f5f5;
    color: #3498db;
}

.settings-nav-link.active {
    background: #3498db;
    color: white;
}

.settings-content {
    min-width: 0;
}

.settings-panel {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.settings-panel.active {
    display: block;
}

.settings-panel h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.settings-panel h3 {
    color: #555;
    font-size: 1rem;
}

.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.settings-section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}

/* Manage section cards */
.manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.manage-link-card {
    display: block;
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.manage-link-card:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.manage-link-card strong {
    display: block;
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.manage-link-card span {
    color: #666;
    font-size: 0.875rem;
}

/* Responsive settings layout */
@media (max-width: 768px) {
    .settings-layout {
        display: block;
    }

    .settings-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .settings-sidebar ul.settings-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
    }

    .settings-nav li {
        border-bottom: none;
        border-right: 1px solid #eee;
        flex-shrink: 0;
    }

    .settings-nav li:last-child {
        border-right: none;
    }

    .settings-nav-link {
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }
}

/* ===================
   DASHBOARD
   =================== */
.dashboard {
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    margin: 0;
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card.stat-warning {
    border-left-color: #f39c12;
}

.stat-card.stat-success {
    border-left-color: #27ae60;
}

.stat-card.stat-danger {
    border-left-color: #e74c3c;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.stat-sub {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Dashboard Calendar Card */
.dashboard > .card {
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.calendar-nav-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-arrow {
    color: #3498db;
    text-decoration: none;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
}

.nav-arrow:hover {
    color: #2980b9;
}

.current-date {
    font-weight: 500;
    color: #333;
}

.today-highlight {
    color: #3498db;
}

.dashboard-calendar-wrapper {
    flex: 1;
    overflow: hidden;
}

.dashboard-daily .calendar-scroll {
    height: 500px;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.card-footer a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.card-footer a:hover {
    text-decoration: underline;
}


/* Dashboard calendar job links */
.dashboard-daily .calendar-job {
    text-decoration: none;
    color: inherit;
}

.dashboard-daily .calendar-job:hover {
    filter: brightness(0.95);
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quick-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .calendar-nav-inline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .current-date {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}