/* ============================================
   MentenantaOffice — Custom Overrides
   Bootstrap 5.3 CDN + brand theming
   ============================================ */

/* --- 1. Variables & Brand --- */
:root {
    --red-primary: #0B7B8F; --red-dark: #086A7C; --red-light: #3DA1B2; --red-bg: #EEF8FA;
    --grey-900: #1A1A2E; --grey-800: #2D2D3F; --grey-700: #4A4A5A; --grey-600: #6B6B7B;
    --grey-500: #8E8E9E; --grey-400: #B0B0BE; --grey-300: #D1D1DB; --grey-200: #E8E8EE;
    --grey-100: #F4F4F8; --grey-50: #FAFAFC;
    --blue: #2E86DE; --blue-bg: #EBF5FF; --green: #27AE60; --green-bg: #EAFAF1;
    --orange: #F39C12; --orange-bg: #FFF8E8; --danger: #E74C3C; --danger-bg: #FDECEB;
    --sidebar-width: 260px; --topbar-height: 56px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08); --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--grey-50); color: var(--grey-900);
}
a { color: var(--red-primary); text-decoration: none; }
a:hover { color: var(--red-dark); }
.btn-primary {
    --bs-btn-bg: var(--red-primary); --bs-btn-border-color: var(--red-primary);
    --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark);
    --bs-btn-active-bg: var(--red-dark);
}
.btn-outline-primary {
    --bs-btn-color: var(--red-primary); --bs-btn-border-color: var(--red-primary);
    --bs-btn-hover-bg: var(--red-primary); --bs-btn-hover-border-color: var(--red-primary);
}
.nav-pills .nav-link.active { background-color: var(--red-primary); }

/* --- 2. Mobile Topbar --- */
.mobile-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1040;
    height: var(--topbar-height); background: var(--grey-900);
    display: flex; align-items: center; justify-content: space-between; padding: 0 1rem;
}

/* --- 3. Sidebar --- */
.sidebar {
    background: var(--grey-900) !important; color: #fff !important;
}
.sidebar .offcanvas-header { background: var(--grey-900); }
.sidebar-body {
    display: flex; flex-direction: column; height: 100%;
    background: var(--grey-900) !important; padding: 0; overflow-y: auto;
}
.sidebar-header {
    display: flex; align-items: center; gap: .75rem;
    padding: 1.25rem 1rem; border-bottom: 1px solid var(--grey-800);
}
.sidebar-header img { height: 36px; width: auto; }
.sidebar-brand { font-size: 1.1rem; font-weight: 700; color: #fff; white-space: nowrap; }
.sidebar-nav { flex: 1; padding: .75rem 0; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .625rem 1rem; color: var(--grey-400); font-size: .9rem;
    border-left: 3px solid transparent; transition: all .2s ease; text-decoration: none;
}
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar-nav .nav-link.active {
    color: #fff; background: rgba(11,123,143,.15);
    border-left-color: var(--red-primary); font-weight: 600;
}
.sidebar-nav .nav-link .nav-icon { width: 20px; height: 20px; flex-shrink: 0; opacity: .7; }
.sidebar-nav .nav-link.active .nav-icon,
.sidebar-nav .nav-link:hover .nav-icon { opacity: 1; }
.sidebar-divider { border-top: 1px solid var(--grey-800); margin: .5rem 1rem; }
.sidebar-section-title {
    display: block; padding: .5rem 1rem .375rem; font-size: .7rem;
    text-transform: uppercase; letter-spacing: .08em; color: var(--grey-500); font-weight: 600;
}
.sidebar-footer { padding: .75rem 1rem; border-top: 1px solid var(--grey-800); }
.sidebar-user {
    display: flex; align-items: center; gap: .75rem;
    text-decoration: none; color: #fff; margin-bottom: .5rem;
}
.sidebar-user:hover { color: #fff; text-decoration: none; }
.sidebar-footer .user-name { font-size: .85rem; font-weight: 600; display: block; color: #fff; }
.sidebar-footer .user-role { font-size: .75rem; color: var(--grey-500); display: block; }
.logout-btn { font-size: .8rem; }

/* Desktop: force sidebar always visible and fixed */
@media (min-width: 992px) {
    .sidebar {
        position: fixed !important; top: 0 !important; left: 0 !important; bottom: 0 !important;
        width: var(--sidebar-width) !important; z-index: 1030 !important;
        transform: none !important; visibility: visible !important;
        display: flex !important; flex-direction: column !important;
        border-right: 1px solid var(--grey-800);
        overflow: hidden;
    }
    /* Remove backdrop on desktop since sidebar is always visible */
    .offcanvas-backdrop { display: none !important; }
}

/* --- 4. Main Content Layout --- */
.main-content { min-height: 100vh; padding: 1.5rem; background: var(--grey-50); }
@media (max-width: 991.98px) {
    .main-content { padding-top: calc(var(--topbar-height) + 1rem); }
}
@media (min-width: 992px) {
    .main-content { margin-left: var(--sidebar-width); }
}

/* --- 5. Page Header --- */
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem;
}
.page-title {
    font-size: 1.6rem; font-weight: 700; color: var(--grey-900);
    display: flex; align-items: center; gap: .5rem;
}
.page-subtitle { font-size: .9rem; color: var(--grey-600); margin: 0; }

/* --- 6. Login Page --- */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--grey-900) 0%, var(--grey-800) 100%); padding: 1rem;
}
.login-card {
    width: 100%; max-width: 420px; padding: 2.5rem 2rem;
    background: #fff; border-radius: .75rem; box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.login-logo { display: block; max-width: 180px; margin: 0 auto 1.5rem; }
.login-title { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--grey-900); margin-bottom: .25rem; }
.login-subtitle { text-align: center; font-size: .9rem; color: var(--grey-600); margin-bottom: 1.5rem; }

/* --- 7. Dashboard Stats --- */
.stat-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.5rem;
    background: #fff; border-radius: .75rem; border-left: 5px solid var(--grey-300); box-shadow: var(--shadow-sm);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-card .stat-icon svg { width: 28px; height: 28px; }
.stat-card .stat-number { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: .75rem; color: var(--grey-600); text-transform: uppercase; letter-spacing: .04em; }
.stat-card--buildings { border-left-color: var(--blue); }
.stat-card--buildings .stat-icon { background: var(--blue-bg); color: var(--blue); }
.stat-card--tickets { border-left-color: var(--red-primary); }
.stat-card--tickets .stat-icon { background: var(--red-bg); color: var(--red-primary); }
.stat-card--visits { border-left-color: var(--green); }
.stat-card--visits .stat-icon { background: var(--green-bg); color: var(--green); }

/* --- 7. Closed/done row styling --- */
.row-closed td { opacity: .45; }
.row-closed:hover td { opacity: .7; }

/* --- 8. Buildings --- */
@media (min-width: 1200px) { .building-col-5 { flex: 0 0 20%; max-width: 20%; } }
.building-card { transition: transform .2s, box-shadow .2s; }
.building-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.building-card--inactive { opacity: .65; }
.building-cover { aspect-ratio: 4/3; overflow: hidden; background: var(--grey-100); }
.building-cover img, .building-cover .card-img-top { width: 100%; height: 100%; object-fit: cover; }
.building-cover-compact { aspect-ratio: 1/1; overflow: hidden; }
.building-cover-compact img, .building-cover-compact .card-img-top { width: 100%; height: 100%; object-fit: cover; }
.floor-list { list-style: none; padding: 0; margin: 0; }
.floor-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem; border-bottom: 1px solid var(--grey-200);
}
.floor-item:last-child { border-bottom: none; }
.floor-item-cover {
    width: 48px; height: 48px; border-radius: 6px; overflow: hidden;
    background: var(--grey-100); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: var(--grey-400);
}
.floor-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.floor-item-cover svg { width: 24px; height: 24px; }

/* --- 9. Ticket List --- */
.ticket-section-header {
    border-left: 4px solid var(--section-color, var(--grey-400)); font-weight: 600;
}
.ticket-cards { padding: 0; }
.ticket-card {
    display: flex; gap: 0; padding: 0; margin: 0;
    border-bottom: 1px solid var(--grey-200); transition: background .15s; color: inherit;
}
.ticket-card:last-child { border-bottom: none; }
.ticket-card:hover { background: var(--grey-100); color: inherit; }
.ticket-card-stripe { width: 4px; flex-shrink: 0; border-radius: 2px 0 0 2px; }
.ticket-card-body { flex: 1; padding: 1rem 1.25rem; min-width: 0; }
.ticket-card-title { font-size: 1rem; margin: .25rem 0 .375rem; }

/* Closed ticket - greyed out */
.ticket-card--closed {
    opacity: 0.5;
}
.ticket-card--closed:hover {
    opacity: 0.7;
}
.ticket-card--closed .ticket-card-title {
    text-decoration: line-through;
    color: var(--grey-500);
}

/* --- Filter Panel --- */
@media (min-width: 992px) {
    .filter-panel { position: sticky; top: 1.5rem; }
}
.filter-panel .card-header {
    border-bottom: 2px solid var(--red-primary);
}
.filter-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--grey-200);
}
.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.filter-section-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--grey-500);
    margin-bottom: .5rem;
}
.filter-section .btn {
    font-size: .8rem;
    text-align: left;
    justify-content: flex-start;
}

/* --- 10. Ticket Detail --- */
.td-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .td-info-grid { grid-template-columns: repeat(3, 1fr); } }
.td-field { min-width: 0; }
.td-label {
    display: block; font-size: .75rem; font-weight: 600; color: var(--grey-500);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem;
}
.ticket-id-title { color: var(--grey-500); font-weight: 400; }
.status-option { cursor: pointer; }
.status-option input { display: none; }
.status-option input:checked + .badge { box-shadow: 0 0 0 2px var(--grey-900); }

/* Closing note */
.closing-note {
    border-left: 3px solid var(--grey-400);
}

/* --- 11. Timeline --- */
.ticket-timeline { position: relative; padding: 1rem 1rem 1rem 3rem; }
.ticket-timeline::before {
    content: ''; position: absolute; left: 2rem; top: 0; bottom: 0;
    width: 2px; background: var(--grey-200);
}
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; left: -2rem; top: .125rem; z-index: 1; }
.timeline-content {
    background: var(--grey-50); border: 1px solid var(--grey-200);
    border-radius: .5rem; padding: .75rem 1rem;
}
.timeline-note { margin-top: .375rem; font-size: .9rem; color: var(--grey-700); }

/* --- 12. Photos --- */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.photo-grid-sm { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 575.98px) { .photo-grid, .photo-grid-sm { grid-template-columns: repeat(2, 1fr); } }
.photo-item { position: relative; }
.photo-thumb { display: block; width: 100%; aspect-ratio: 1/1; overflow: hidden; border-radius: 6px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.photo-thumb:hover img { opacity: .85; }
.photo-caption { font-size: .75rem; color: var(--grey-600); margin-top: .25rem; text-align: center; display: block; }
.photo-delete-btn {
    position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
    border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.photo-delete-btn:hover { background: var(--danger); }
.photo-delete-btn .icon { width: 14px; height: 14px; }
.photo-upload-area { border: 2px dashed var(--grey-300); border-radius: .5rem; padding: .75rem; }
.photo-upload-area:hover { border-color: var(--red-primary); }

/* --- 13. User Avatar --- */
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--red-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; flex-shrink: 0; text-transform: uppercase;
}
.user-avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.user-avatar-xs { width: 22px; height: 22px; font-size: .6rem; }

/* --- 14. Global UI Polish --- */
.card { border-color: var(--grey-200); border-radius: .75rem; }
.card-header { background: #fff; font-weight: 600; }
.table th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--grey-500); }
.table td { vertical-align: middle; }
.badge { font-weight: 600; padding: .4em .65em; }

/* --- 15. Misc --- */
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--grey-500); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto .75rem; color: var(--grey-400); display: block; }
.fw-600 { font-weight: 600; }
.icon { width: 16px; height: 16px; vertical-align: middle; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 24px; height: 24px; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.current-cover-img { max-height: 150px; border-radius: .5rem; }
.notes-content { font-size: .9rem; line-height: 1.6; color: var(--grey-700); }

/* --- 16. Flash Toast Notifications --- */
.flash-toast-container {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1080;
    max-width: 420px; width: calc(100% - 2rem);
    pointer-events: none;
}
.flash-toast {
    pointer-events: auto;
    border-radius: .5rem;
    font-size: .9rem;
    animation: flashSlideIn .35s ease-out;
}
@keyframes flashSlideIn {
    from { opacity: 0; transform: translateY(1rem); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Mobile: bottom-center */
@media (max-width: 575.98px) {
    .flash-toast-container {
        right: 50%; transform: translateX(50%);
        bottom: 1rem; max-width: 92%;
    }
}

/* --- 17. Photo Lightbox --- */
.lightbox-img {
    max-width: 90vw; max-height: 85vh; object-fit: contain;
    border-radius: .25rem; user-select: none;
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.15); border: none; color: #fff;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s; z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-nav[disabled] { opacity: .2; pointer-events: none; }

/* --- 18. Priority Checkmark --- */
.priority-check { display: none; line-height: 0; }
.btn-check:checked + .btn .priority-check { display: inline-flex; }

/* --- 19. Drag & Drop Zones --- */
.drag-handle {
    cursor: grab; color: var(--grey-400); padding: .25rem;
    display: flex; align-items: center; flex-shrink: 0;
    touch-action: none;
}
.drag-handle:hover { color: var(--grey-600); }
.floor-item.dragging { opacity: 0.35; background: var(--grey-100); }
.floor-item.drag-over { border-top: 2px solid var(--red-primary); }

/* --- 20. Bulk Ticket Selection --- */
.ticket-card-wrapper {
    display: flex; align-items: stretch;
    border-bottom: 1px solid var(--grey-200);
}
.ticket-card-wrapper:last-child { border-bottom: none; }
.ticket-card-wrapper .ticket-card { border-bottom: none; flex: 1; min-width: 0; }
.ticket-select-col {
    display: flex; align-items: center; justify-content: center;
    width: 44px; flex-shrink: 0;
    background: var(--grey-50); border-right: 1px solid var(--grey-200);
    cursor: pointer; transition: background .15s;
}
.ticket-select-col:hover { background: var(--grey-100); }
.ticket-select-col .form-check-input {
    width: 1.15em; height: 1.15em; margin: 0; cursor: pointer;
}
.ticket-card-wrapper.ticket-selected { background: var(--red-bg); }
.ticket-card-wrapper.ticket-selected .ticket-select-col { background: var(--red-bg); }

/* Floating bulk action bar */
.bulk-action-bar {
    position: fixed; bottom: -80px; left: 0; right: 0; z-index: 1060;
    transition: bottom .3s ease;
    pointer-events: none;
}
.bulk-action-bar.visible { bottom: 0; pointer-events: auto; }
.bulk-action-bar-inner {
    max-width: 700px; margin: 0 auto 1.25rem;
    background: var(--grey-900); color: #fff;
    border-radius: .75rem; padding: .75rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.bulk-action-count { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.bulk-action-bar .btn-danger {
    --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger);
    font-size: .85rem; padding: .4rem 1rem; white-space: nowrap;
}
.bulk-action-bar .btn-success {
    font-size: .85rem; padding: .4rem 1rem; white-space: nowrap;
}
.bulk-action-bar .btn-link {
    color: var(--grey-400); font-size: .85rem; text-decoration: none; white-space: nowrap;
}
.bulk-action-bar .btn-link:hover { color: #fff; }

/* Responsive: on mobile with sidebar, offset the bar */
@media (min-width: 992px) {
    .bulk-action-bar { left: var(--sidebar-width); }
}

/* Select All checkbox in header */
.select-all-col .form-check-input {
    width: 1.15em; height: 1.15em; cursor: pointer;
}

/* --- 21. Upcoming Visits List (sidebar) --- */
.upcoming-visit-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .625rem 0; border-bottom: 1px solid var(--grey-200);
}
.upcoming-visit-item:last-child { border-bottom: none; }
.upcoming-visit-date {
    flex-shrink: 0; width: 44px; text-align: center;
    background: var(--grey-100); border-radius: .375rem; padding: .25rem;
}
.upcoming-visit-date .day { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.upcoming-visit-date .month { font-size: .7rem; font-weight: 600; text-transform: uppercase; color: var(--grey-500); letter-spacing: .05em; }
.upcoming-visit-info { flex: 1; min-width: 0; font-size: .85rem; }
.upcoming-visit-info .building-name { font-weight: 600; }
.upcoming-visit-info .area-name { color: var(--grey-500); }
.upcoming-month-separator {
    display: flex; align-items: center; gap: .5rem; padding: .5rem 0; margin: .25rem 0;
}
.upcoming-month-separator::before,
.upcoming-month-separator::after {
    content: ''; flex: 1; height: 1px; background: var(--grey-300);
}
.upcoming-month-separator span {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--grey-500); letter-spacing: .05em;
}

/* --- 22. Calendar View --- */
.calendar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem; border-bottom: 1px solid var(--grey-200);
}
.calendar-month-name { font-size: 1.1rem; font-weight: 700; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day-header {
    padding: .5rem; text-align: center;
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--grey-500);
    border-bottom: 1px solid var(--grey-200);
}
.calendar-day {
    min-height: 90px; padding: .375rem .5rem;
    border-right: 1px solid var(--grey-200);
    border-bottom: 1px solid var(--grey-200);
    transition: background .15s;
    position: relative;
}
.calendar-day:nth-child(7n + 7) { border-right: none; }
.calendar-day:hover { background: var(--grey-100); }
.calendar-day--other-month { background: var(--grey-50); color: var(--grey-400); }
.calendar-day--today { background: var(--blue-bg); }
.calendar-day--selected { background: var(--red-bg); outline: 2px solid var(--red-primary); outline-offset: -2px; }
.calendar-day-number {
    font-size: .85rem; font-weight: 600; margin-bottom: .25rem;
    display: flex; align-items: center; justify-content: space-between;
}
.calendar-day-add {
    width: 18px; height: 18px; border-radius: 50%;
    border: none; background: transparent; color: var(--grey-400);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; font-size: 14px; line-height: 1;
    opacity: 0; transition: opacity .15s, background .15s;
}
.calendar-day:hover .calendar-day-add { opacity: 1; }
.calendar-day-add:hover { background: var(--red-primary); color: #fff; }
.calendar-day-labels { display: flex; flex-direction: column; gap: 2px; }
.calendar-visit-label {
    font-size: .65rem; line-height: 1.2; padding: 1px 4px;
    border-radius: 3px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; cursor: pointer;
}
.calendar-visit-label--pending { background: var(--orange-bg); color: #946206; border-left: 2px solid var(--orange); }
.calendar-visit-label--done { background: var(--green-bg); color: #1a7a42; border-left: 2px solid var(--green); }
.calendar-visit-label--missed { background: var(--danger-bg); color: #c0392b; border-left: 2px solid var(--danger); }
.calendar-day-detail {
    padding: 1rem; border-top: 2px solid var(--red-primary); background: var(--grey-50);
}
.calendar-day-detail-title { font-weight: 700; margin-bottom: .75rem; font-size: .95rem; }
.calendar-visit-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .5rem .75rem; background: #fff;
    border: 1px solid var(--grey-200); border-radius: .375rem;
    margin-bottom: .375rem; font-size: .9rem;
}
.calendar-visit-item:last-child { margin-bottom: 0; }
@media (max-width: 575.98px) {
    .calendar-day { min-height: 48px; padding: .25rem; }
    .calendar-day-number { font-size: .75rem; }
    .calendar-visit-label { font-size: .55rem; }
}

/* --- 23. Visit Table --- */
.visit-row--done { background: var(--green-bg); }
.visit-row--missed { background: var(--danger-bg); opacity: 0.7; }
.visit-detail-cell {
    padding: 1rem 1.5rem; background: var(--grey-50);
    border-left: 3px solid var(--green);
}

/* --- 24. Quick-Create Modal Date Rows --- */
.date-row {
    display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem;
}
.date-row input[type="date"] { max-width: 220px; }

/* --- 25. Print --- */
@media print {
    .sidebar, .offcanvas, .mobile-topbar, .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
    body { background: #fff !important; }
}
