:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #0ea5e9;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --bg: #f0f4f8;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 4px 24px rgba(15, 23, 42, 0.1);
    --radius: 10px;
    --radius-sm: 6px;
    --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.login-page-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.login-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand .icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.login-brand h1 { font-size: 1.5rem; color: var(--primary-dark); font-weight: 700; }
.login-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Unified site header (agency banner + navigation) */
.site-header {
    background: #0a3161;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.site-header-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem 0.75rem;
}

.site-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.site-header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.site-header-logo-wrap {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-header-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.site-header-logo-fallback {
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.9;
}

.site-header-identity {
    min-width: 0;
}

.site-header-title {
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #fff;
}

.site-header-contact {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
}

.site-header-portal-badge {
    flex: 0 0 auto;
    align-self: center;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    text-align: center;
    max-width: 200px;
    line-height: 1.3;
}

.site-header-tagline {
    margin: 0.65rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.45;
}

.site-header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.site-header-nav {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.site-header-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}

.site-header-nav a:hover,
.site-header-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.site-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    flex-wrap: wrap;
}

.site-header-signout {
    color: #fff;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.15s;
}

.site-header-signout:hover {
    background: rgba(255, 255, 255, 0.12);
}

.agency-preview-wrap {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
}

.agency-preview-wrap .site-header {
    position: relative;
    border-radius: 0;
}

.login-page .site-header {
    position: relative;
    border-radius: 0;
}

/* Main */
.app-main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
}

.app-footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.app-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* Typography */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header--with-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header--with-actions h1 {
    margin-bottom: 0.25rem;
}

.page-header-actions {
    text-align: right;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.page-header p {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Instructions help page */
.instructions-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.instructions-section {
    scroll-margin-top: 5.5rem;
}

.instructions-prose p {
    margin: 0 0 0.85rem;
    line-height: 1.55;
    color: var(--text);
}

.instructions-prose ul {
    margin: 0 0 0.85rem 1.1rem;
    padding: 0;
    line-height: 1.55;
    color: var(--text);
}

.instructions-prose li {
    margin-bottom: 0.4rem;
}

.instructions-prose a {
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body { padding: 1.25rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary-light);
}

.stat-card.warning { border-left-color: var(--warning); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.danger { border-left-color: var(--danger); }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea { min-height: 100px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--accent);
    color: #fff;
}
.btn-secondary:hover { background: #0284c7; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Tables */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover td { background: #f8fafc; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-muted { background: #f1f5f9; color: #475569; }

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.inspection-due-settings {
    padding: 1rem;
    background: var(--bg-muted, #f1f5f9);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.inspection-due-toggle {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.inspection-due-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-top: 0.75rem;
}

.inspection-due-fields input[type="number"] {
    width: 5rem;
}

.inspection-due-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.inspection-overdue-banner strong {
    display: block;
    margin-bottom: 0.5rem;
}

.inspection-overdue-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inspection-overdue-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Checklist */
.checklist-grid {
    display: grid;
    gap: 0.75rem;
}

.checklist-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.checklist-item label.item-name {
    font-weight: 500;
    margin: 0;
}

.status-radios {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-radios label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.status-radios input { width: auto; }

/* Photos */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.25rem;
}

.tabs a, .tabs button {
    padding: 0.6rem 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tabs a.active, .tabs a:hover,
.tabs button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Search */
.search-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.search-hero input {
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 0.85rem 1rem;
    border: none;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Login challenge */
.login-challenge-box {
    background: #fef3c7;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fcd34d;
    margin-bottom: 0.5rem;
}
.login-challenge-question {
    font-size: 0.95rem;
    margin: 0.25rem 0 0.75rem;
    color: #78350f;
}

/* Notification bell */
.site-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.site-header-account {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.site-header-account[aria-current="page"] {
    background: rgba(255, 255, 255, 0.22);
}
.site-header-user-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}
.notification-bell-wrap {
    position: relative;
}
.notification-bell {
    position: relative;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    line-height: 1;
    color: #fff;
}
.notification-bell:hover,
.notification-bell[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.22);
}
.notification-bell-icon {
    font-size: 1.1rem;
}
.notification-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    border: 2px solid #0a3161;
}
.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    max-width: 360px;
    background: #fff;
    color: var(--text, #1e293b);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    overflow: hidden;
}
.notification-dropdown-header {
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.notification-dropdown-empty {
    margin: 0;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}
.notification-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}
.notification-dropdown-list a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--primary, #0a3161);
    text-decoration: none;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.notification-dropdown-list li:last-child a {
    border-bottom: none;
}
.notification-dropdown-list a:hover {
    background: #f8fafc;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-card {
    background: var(--surface, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.modal-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.modal-card--calendar {
    max-width: min(960px, 96vw);
    max-height: 90vh;
    overflow-y: auto;
}

.service-cal-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* Print / Report */
@media print {
    /* Strip all portal chrome. Sticky .site-header can still paint in some print engines unless fully removed from layout. */
    body > header,
    header.site-header,
    .site-header,
    .site-header-shell,
    .app-header,
    .app-footer,
    .no-print,
    .form-actions,
    .tabs,
    .modal-overlay,
    .notification-bell-wrap,
    .notification-dropdown,
    .alert {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        position: static !important;
    }
    .app-main {
        padding: 0 !important;
        max-width: none !important;
        margin: 0 !important;
    }
    body {
        background: #fff !important;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    .report-document {
        break-inside: avoid;
    }
}

.report-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.report-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.5; }

/* Admin subnav */
.subnav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.subnav a {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.subnav a:hover, .subnav a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.link-list { list-style: none; }
.link-list li { margin-bottom: 0.5rem; }
.link-list a { color: var(--primary); font-weight: 500; }

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}

.permissions-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.permissions-grid input { width: auto; }

.dashboard-panels {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-stats .stat-card { min-height: 100px; }

@media (max-width: 900px) {
    .dashboard-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .site-header-shell { padding: 0.85rem 1rem 0.65rem; }
    .site-header-logo-wrap { width: 56px; height: 56px; }
    .site-header-portal-badge { font-size: 0.7rem; max-width: 140px; }
    .site-header-bottom { flex-direction: column; align-items: flex-start; }
    .site-header-nav { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
}

/* Dashboard — scheduled service calendar */
.service-cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.service-cal-month-label {
    font-weight: 600;
    min-width: 8rem;
    text-align: center;
}

.service-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 1rem;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.service-cal-dow {
    background: var(--bg-muted, #f1f5f9);
    padding: 0.35rem 0.25rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.service-cal-cell {
    background: var(--surface, #fff);
    min-height: 5.5rem;
    padding: 0.25rem;
    font-size: 0.75rem;
}

.service-cal-cell--empty {
    background: var(--bg-muted, #f8fafc);
    min-height: 2rem;
}

.service-cal-cell--has {
    background: #eff6ff;
}

.service-cal-daynum {
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.service-cal-event {
    display: block;
    padding: 0.15rem 0.25rem;
    margin-bottom: 2px;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.68rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-cal-event:hover {
    filter: brightness(1.08);
    color: #fff;
}

@media (max-width: 768px) {
    .service-cal-grid {
        font-size: 0.65rem;
    }
    .service-cal-cell {
        min-height: 4.5rem;
    }
}
