/* ============================================================================
   BOISBRIAND KH BOOKING - MODERN MOBILE-FIRST DESIGN
   ============================================================================ */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: none;
}

@media (min-width: 640px) {
    .user-name {
        display: inline;
    }
    .site-title {
        font-size: 1.5rem;
    }
}

/* Main Content */
.main-content {
    padding: 1.5rem 0 6rem;
    min-height: calc(100vh - 5rem);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.filter-toggle {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Room Legend */
.room-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.room-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primaryz {
    background: #EE6D48;
    color: white;
}


.btn-primaryx {
    background: var(--primary-color);
    color: white;
}
.btn-secondaryx{
    background: #E5E7EB;
    color: #4B5563;
}	

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-delete {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-left: -5px;
}

.btn-delete:hover {
    opacity: 1;
}

/* Floating Action Button */
.btn-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-full);
    background: var(--success-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 50;
}

.btn-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.btn-fab:active {
    transform: scale(0.95);
}

.fab-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Agenda Container */
.agenda-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.agenda-list {
    display: flex;
    flex-direction: column;
}

/* Date Divider */
.date-divider {
    background: var(--background);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 4.5rem;
    z-index: 10;
}


.date-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Agenda Item */
.agenda-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    transition: background 0.2s;
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-item:hover {
    background: #f8fafc;
}

.agenda-item.past-event {
    opacity: 0.6;
    background: #f1f5f9;
}

.agenda-time {
    flex-shrink: 0;
}

.time-badge {
    background: #3366CC;
    background-color: #3366CC;
    color: white;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.past-event .time-badge {
    background: var(--secondary-color);
}

.agenda-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agenda-room {
    padding-left: 0.75rem;
    margin-bottom: 0.25rem;
}

.room-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.agenda-reason {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.agenda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.25rem;
}

.meta-item {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agenda-actions {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--background);
}

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.checkbox-label input[type=checkbox] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .main-content {
        padding: 1rem 0 5rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .agenda-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .time-badge {
        display: inline-block;
    }
    
    .btn-fab {
        width: 3rem;
        height: 3rem;
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab-icon {
        font-size: 1.75rem;
    }
}

/* Login Page Specific Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-card .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.login-card .btn {
    width: 100%;
}

/* Date + Time stacked */
.agenda-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
    min-width: 170px; /* adjust if you want */
}

/* Bigger date style (replaces inline style) */
.date-label-lg {
    font-size: 12pt;
    font-weight: bold;
    color: #316293;
    text-transform: none;
    letter-spacing: normal;
}

/* Shared mobile navigation and administration */
.khb-nav{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem max(1rem,calc((100vw - 1100px)/2));background:#fff;border-bottom:1px solid #e2e8f0;position:relative;z-index:30}
.khb-brand{font-size:1.05rem;font-weight:700;color:#336699;text-decoration:none}
.khb-menu{position:relative}.khb-menu summary{list-style:none;cursor:pointer;border:1px solid #cbd5e1;border-radius:8px;padding:.65rem .85rem;white-space:nowrap}.khb-menu summary::-webkit-details-marker{display:none}
.khb-menu nav{position:absolute;right:0;top:calc(100% + .5rem);width:min(280px,85vw);background:white;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 12px 32px #0f172a22;padding:.5rem}
.khb-menu nav a,.khb-menu nav span{display:block;padding:.75rem;border-radius:6px;overflow-wrap:anywhere}.khb-menu nav a:hover{background:#eff6ff}.khb-menu nav span{color:#64748b;font-size:.85rem}
.khb-page{max-width:1100px;padding:1.5rem 1rem 5rem}.khb-page h1{font-size:1.65rem;margin-bottom:1rem}.khb-page h2{font-size:1.2rem}.khb-page h3{font-size:1rem}
.khb-page .card{margin:1rem 0;padding:1.25rem}.khb-page label{display:block;margin:.8rem 0}.khb-page input,.khb-page select,.khb-page textarea{font-size:16px}.khb-page .checkbox-label{display:flex}.khb-page .checkbox-label input{width:auto}
.khb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:1rem}.khb-meeting{padding:1rem 0;border-bottom:1px solid #e2e8f0}.khb-meeting:last-child{border-bottom:0}.khb-meeting p{margin:.5rem 0;overflow-wrap:anywhere}
.khb-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.khb-inline{display:inline-block}.khb-muted{color:#64748b}.khb-success{background:#dcfce7;color:#166534;padding:1rem;border-radius:8px}.khb-warning{border:2px solid #eab308}.khb-warning li{margin:1rem 0}.admin-tabs{flex-wrap:wrap}.btn-danger{background:#b91c1c;color:white}.khb-page a:focus-visible,.khb-menu summary:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
@media(max-width:600px){.khb-nav{padding:.85rem}.khb-brand{max-width:65%}.khb-page .card{padding:1rem}.khb-page .btn{margin:.25rem 0;min-height:44px}.header .container{padding:0}.table-container{overflow-x:auto}}
/* Mobile-first visual refresh */
body{background:#f5f8fc;color:#18334c}.khb-nav{padding:1.1rem max(1rem,calc((100vw - 1100px)/2));box-shadow:0 3px 18px #17334d08}.khb-brand{font-size:clamp(1.6rem,5.5vw,2.1rem);font-weight:800;letter-spacing:-.055em;color:#244c6e;line-height:1.2}
.khb-menu summary{border:0;background:#edf3f9;color:#244c6e;font-weight:600}.khb-menu nav{padding:.6rem;border:0;border-radius:18px;box-shadow:0 16px 60px #18334c26}.khb-menu nav a{display:flex;align-items:center;gap:.85rem;color:#294b65;font-weight:550;text-decoration:none;min-height:48px}.khb-menu nav a[aria-current=page]{background:#eaf2fb;color:#1b5b8b}.khb-menu nav .menu-icon{display:inline-flex;padding:0;font-size:1.25rem;width:24px;justify-content:center;color:inherit}.khb-menu nav>span{border-bottom:1px solid #edf2f7;margin-bottom:.35rem}
.khb-page{max-width:1000px}.khb-page h1{color:#244c6e;font-size:1.6rem;letter-spacing:-.035em}.khb-page .card,.record-card{background:white;border:1px solid #e5edf5;border-radius:16px;box-shadow:0 4px 16px #18334c04}.khb-page .card h2{color:#244c6e;letter-spacing:-.015em}.khb-meeting{border-color:#edf2f7;padding:1rem 0}.meeting-date{font-weight:650;color:#316293}.subtle-add{display:inline-block;margin:.4rem 0;color:#316293;font-size:.9rem;font-weight:600}.khb-actions,.agenda-actions{display:flex;align-items:center;gap:1.4rem;flex-wrap:wrap}.khb-actions form{margin:0}.khb-actions .btn-delete{font-size:small;padding:.45rem .2rem;background:transparent;color:#316293}.delete-action{color:#c34343!important}.agenda-actions .btn-delete{text-decoration:none}.agenda-item:target,.record-card:target{outline:2px solid #5f9bc6;outline-offset:3px;scroll-margin-top:24px}
.page-title{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-bottom:1rem}.page-title h1{margin:0}.list-filter{display:flex;gap:.65rem;flex-wrap:wrap;margin-bottom:1rem}.list-filter .form-control{flex:1;min-width:min(100%,180px)}.record-list{display:grid;gap:.65rem}.record-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.15rem;overflow-wrap:anywhere}.record-card h2{font-size:1rem;margin:0 0 .3rem}.record-card p{margin:.25rem 0;font-size:.9rem}.record-card .khb-actions{flex-shrink:0}.record-card[hidden]{display:none}.profile-summary{display:flex;gap:1rem;align-items:center}.profile-avatar{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:#e9f2fb;color:#316293;font-weight:750;font-size:1.6rem;flex-shrink:0}.profile-summary p{margin:.2rem 0}
.editor-dialog{border:0;border-radius:20px;width:min(560px,calc(100vw - 24px));max-height:90dvh;padding:1.4rem;box-shadow:0 24px 90px #0f172a40;overflow-y:auto;position:fixed}.editor-dialog::backdrop{background:#142b4666;backdrop-filter:blur(3px)}.editor-dialog [data-editor]{margin:0;padding:0;border:0;box-shadow:none}.editor-dialog h1,.editor-dialog h2{font-size:1.4rem;padding-right:1.6rem;color:#244c6e}.editor-dialog label{display:block;margin:.8rem 0}.editor-dialog .form-control{font-size:16px}.editor-dialog .khb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-close{position:absolute;right:12px;top:10px;border:0;background:#edf3f9;color:#244c6e;width:36px;height:36px;border-radius:50%;font-size:25px;cursor:pointer}.editor-dialog .checkbox-label{display:flex}.editor-dialog .checkbox-label input{width:auto}.form-feedback{padding:.85rem 1rem;margin:.75rem 0;border-radius:10px;font-size:.95rem;line-height:1.5;background:#fff0f0;color:#922d2d}.form-feedback.warning{background:#fff8e4;color:#735015}.form-feedback.success{background:#e9f7ee;color:#20623b}.form-feedback .btn{margin:.5rem .5rem 0 0}.modal-content{max-height:90dvh;overflow-y:auto}.modal-content input,.modal-content select,.modal-content textarea{font-size:16px}
@media(max-width:600px){.khb-page{padding-top:1rem}.khb-nav{padding:1rem}.khb-brand{max-width:75%}.khb-menu summary{font-size:.9rem;padding:.7rem}.record-card{align-items:flex-start;flex-direction:column;gap:.4rem;padding:.9rem 1rem}.record-card .khb-actions{align-self:flex-end}.page-title .btn{font-size:.85rem;padding:.65rem .8rem}.editor-dialog{padding:1.1rem}.modal-content{width:calc(100vw - 20px);margin:0}.agenda-actions{gap:1.5rem}.profile-summary{align-items:flex-start}}

/* Center shared editors after the global margin reset; constrain native iOS controls. */
.editor-dialog{inset:0;margin:auto;width:calc(100% - 24px);max-width:560px;max-height:calc(100dvh - 32px);box-sizing:border-box}
.editor-dialog .khb-grid>*,.editor-dialog form{min-width:0}
.editor-dialog .form-control{min-width:0;max-width:100%;box-sizing:border-box}
.editor-dialog input[type=time]{appearance:none;-webkit-appearance:none;width:100%;min-width:0}
.editor-dialog .khb-actions{gap:.75rem}
@media(max-width:600px){.editor-dialog{width:calc(100% - 20px);padding:1.1rem;max-height:calc(100dvh - 24px)}.editor-dialog .khb-grid{gap:.75rem}}

/* Shared KH Booking header and compact cards. */
.khb-nav{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;min-height:82px;padding:1rem max(1rem,calc((100vw - 1100px)/2))}.khb-brand{display:flex;align-items:center;gap:.6rem;font-size:clamp(1.35rem,5vw,1.9rem);max-width:none;letter-spacing:-.035em}.khb-brand>span{white-space:nowrap}.khb-brand>.ui-icon{width:36px;height:36px;flex-shrink:0;color:#316293}.ui-icon{width:16px;height:16px;display:inline-block;vertical-align:-3px;flex-shrink:0}.khb-menu nav span{display:inline;padding:0;color:inherit;font-size:inherit}.khb-menu .menu-profile{border-bottom:1px solid #edf2f7;border-radius:0;margin-bottom:.3rem}.menu-profile>span{display:flex!important;flex-direction:column;gap:.15rem}.menu-profile small{font-size:.75rem;color:#64748b}.khb-menu nav .admin-pill{margin-left:auto;background:#e9edf8;color:#55659b;font-size:.65rem;border-radius:99px;padding:.2rem .45rem}.time-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.time-fields>label{min-width:0}.time-fields select{width:100%;min-width:0}.date-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem}.date-heading label{margin:.5rem 0}.full-days{font-size:.85rem;gap:.45rem;align-items:center}.booking-dates{margin-bottom:.7rem}[hidden]{display:none!important}.editor-footer{display:flex;justify-content:space-between;gap:1rem;margin-top:1.2rem}.khb-page .schedule-card h2,.khb-page .committee-card h2{font-size:1.35rem;line-height:1.3;margin-bottom:.6rem}.schedule-card .khb-meeting{padding:.6rem 0}.schedule-card .khb-meeting p{margin:.2rem 0}.meeting-section-title{color:#64748b;font-size:.85rem!important;font-weight:650;margin:1rem 0 .25rem}.committee-card .khb-meeting{padding:.65rem 0}.committee-card .committee-duty{font-size:.75rem;text-transform:uppercase;letter-spacing:.07em;color:#68809a}.committee-card .khb-meeting p{margin:.3rem 0;line-height:1.6}.committee-card a{font-size:.9rem;text-decoration:none}.booking-actions .btn-delete{color:#0066ff!important;font-size:small;background:transparent;padding:.45rem .2rem;text-decoration:none;display:inline-flex;align-items:center;gap:.3rem}.booking-actions .delete-action{color:#f00!important}.booking-actions form{order:0}.booking-actions>a{order:1}.user-actions{align-self:flex-start!important;justify-content:flex-start}.role-pill{display:inline-block;border-radius:99px;font-size:.7rem;padding:.2rem .5rem;margin-left:.25rem}.role-member{background:#e0f4e9;color:#216947}.role-admin{background:#e7e9fc;color:#51469a}.role-viewer{background:#e0effb;color:#316293}.role-disabled{background:#f1e5e5;color:#95504d}.booking-audit{font-size:.75rem!important;color:#8593a3}.record-card .meeting-date{background:#edf3f9;padding:.35rem .6rem;border-radius:8px;display:inline-block}.form-feedback.warning:before{content:'⚠';font-size:1.25rem;margin-right:.5rem}.form-feedback.conflict:before{content:'⚠';margin-right:.5rem}.user-actions{width:auto}@media(max-width:600px){.khb-nav{min-height:78px}.khb-brand>.ui-icon{width:30px;height:30px}.khb-menu summary{padding:.65rem}.time-fields{gap:.75rem}.schedule-card,.committee-card{margin:.6rem 0!important}.user-actions{align-self:flex-start!important}}

.record-card:has(.user-actions){align-items:flex-start;flex-direction:column;gap:.5rem}.meeting-empty{font-size:.85rem;margin:.25rem 0!important}.booking-actions .btn-delete{min-height:36px}.booking-dates input[type=date]{min-width:0;width:100%;max-width:100%}

.record-card .user-last-access{font-size:.72rem;color:#8593a3;margin:.25rem 0 0;line-height:1.4}

/* Unified safe-area header and clearer card hierarchy. */
html{background:#fff;padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding-top:0}.khb-nav{margin:0;background:#fff;padding-top:1rem;padding-bottom:1rem;min-height:86px}.khb-brand{font-size:clamp(1.65rem,5.7vw,2.1rem);gap:.65rem}.khb-brand>.ui-icon{width:44px;height:44px;color:#4c70ad}.date-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;align-items:end}.date-control{display:block;min-width:0}.date-control>span{display:block;margin-bottom:.4rem}.date-row .full-days{align-self:end;margin-bottom:.85rem;white-space:nowrap}.booking-dates .end-date-control{width:calc((100% - 1rem)/2)}.booking-dates input[type=date]{width:100%;min-width:0;box-sizing:border-box}.congregation-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.7rem}.congregation-heading h2{flex:1;min-width:0}.card-add{display:flex;align-items:center;justify-content:center;border-radius:50%;width:30px;height:30px;flex-shrink:0;background:#4c70ad;color:#fff;text-decoration:none;font-size:25px;line-height:1}.card-add:hover{background:#36598e}.card-add:focus-visible{outline:3px solid #93b6e3;outline-offset:3px}.khb-page .schedule-card h2,.khb-page .committee-card h2{font-size:1.4rem;font-weight:750}.meeting-section-title,.committee-card .committee-duty{font-size:1.05rem!important;color:#244c6e;font-weight:700;text-transform:none;letter-spacing:0;margin-top:.9rem;padding-bottom:.3rem;border-bottom:1px solid #e4edf6}.schedule-card .meeting-date{font-size:.95rem;font-weight:550;color:#4d6780}.committee-card .khb-meeting p strong{font-weight:550;font-size:.95rem}.editor-footer,.modal-actions{display:flex;align-items:center;justify-content:center;gap:1.2rem;margin-top:1.2rem;padding-top:1rem;border-top:1px solid #e5edf5}.editor-footer .btn,.modal-actions .btn{margin:0!important}.record-card .booking-owner{margin-top:.65rem}.booking-owner .ui-icon,.booking-audit .ui-icon{margin-right:.3rem}.booking-audit{margin-top:.4rem!important}@media(max-width:600px){.khb-brand>.ui-icon{width:38px;height:38px}.khb-nav{min-height:82px;padding:1rem}.date-row{gap:.75rem}.booking-dates .end-date-control{width:calc((100% - .75rem)/2)}.editor-footer,.modal-actions{gap:1rem;flex-wrap:wrap}.card-add{width:28px;height:28px;font-size:23px}}

.card-add{position:relative}.card-add:before{content:"";position:absolute;inset:-7px;border-radius:50%}

.admin-booking-card{display:block;min-width:0}.admin-booking-dates{font-size:17px;font-weight:650;color:#316293;white-space:nowrap;margin-bottom:.65rem;overflow:hidden;width:100%}.admin-booking-dates.date-period{white-space:normal}.date-period>span{display:block}.admin-booking-card .agenda-reason{margin-top:.25rem}.admin-booking-card .agenda-actions{margin-top:.5rem}.admin-booking-card .agenda-details .meta-item{font-weight:400}.admin-booking-card .agenda-meta{gap:1rem}

/* Keep Full days clear of the native iPhone date control. */
.date-row>.full-days{justify-self:end;justify-content:flex-end;margin-left:.75rem;padding-left:.35rem;gap:.45rem}
.date-row>.full-days input[type=checkbox]{flex-shrink:0}

.card-add>.card-add-icon{display:block;width:18px;height:18px;flex-shrink:0}

.khb-brand{color:#4c70ad}.date-row>.full-days{transform:translateX(-6px)}.admin-time-badge{display:inline-block;background:#edf3f8;border-radius:7px;padding:.15em .45em;margin-left:.3em;color:#316293;font-size:inherit;white-space:nowrap}.editor-dialog.booking-editor-dialog{padding:0;max-width:500px;border-radius:.75rem}.booking-editor-dialog .booking-editor form{padding:1.5rem}.booking-editor-dialog .modal-header h2{font-size:1.25rem;margin:0;padding:0;font-weight:600;letter-spacing:normal}.booking-editor-dialog .modal-header{padding:1.5rem}.booking-editor-dialog .booking-editor .form-label{margin:0 0 .5rem;font-size:.9375rem}.booking-editor-dialog .booking-editor .checkbox-label{margin:0;gap:.5rem}.booking-editor-dialog .modal-actions{padding:1.5rem;padding-top:1rem;gap:1rem;margin-top:1.2rem}.booking-editor-dialog .booking-editor .date-control{margin:.8rem 0}.booking-editor-dialog .booking-editor .date-row .full-days{margin-bottom:.85rem}@media(max-width:600px){.editor-dialog.booking-editor-dialog{width:calc(100vw - 20px);padding:0}}

.booking-editor-dialog .booking-editor .date-control,.booking-editor-dialog .booking-editor .time-fields>label{margin:0;display:block}

.agenda-list .record-card.admin-booking-card{display:block;padding:1rem 1.15rem;border:1px solid #e5edf5;background:#fff}.agenda-list.record-list{gap:.65rem}@media(max-width:600px){.agenda-list .record-card.admin-booking-card{padding:.9rem 1rem}}

.schedule-card .meeting-line{display:flex;align-items:center;gap:.4rem;width:100%;min-width:0;white-space:nowrap;font-size:15px;font-weight:550;color:#4d6780;margin:0}.meeting-line>span{flex-shrink:0;font-size:inherit}.meeting-line-icon{width:22px;height:22px;flex-shrink:0;display:block;color:#4c70ad}.schedule-card .khb-meeting{padding:.35rem 0}.schedule-card .khb-meeting .khb-actions{margin:0 0 0 28px;gap:1.4rem}.schedule-card .khb-meeting .btn-delete{padding:.2rem .2rem;min-height:32px}

/* Service committee contacts: muted icons and one divider per responsibility. */
.committee-card .khb-meeting{border-bottom:0}.committee-card .ui-icon{color:#8593a3;margin-right:.35rem}

/* Let the dashboard card gaps use the same page background as other lists. */
.agenda-container{background:transparent;box-shadow:none}

/* Dashboard freeze pane: cards scroll beneath the header and room filter. */
.dashboard-frozen-pane{position:sticky;top:env(safe-area-inset-top,0px);z-index:40;background:#f5f8fc;border-bottom:1px solid #e2e8f0;box-shadow:0 3px 12px #18334c08}.dashboard-frozen-pane .room-legendx{padding-top:.65rem!important;padding-bottom:.65rem!important}

/* Keep section headings and congregation filters visible above scrolling cards. */
.section-frozen-pane{position:sticky;top:env(safe-area-inset-top,0px);z-index:40;background:#f5f8fc;border-bottom:1px solid #e2e8f0;box-shadow:0 3px 12px #18334c08}.section-filter-controls{max-width:1000px;padding:.75rem 1rem .65rem}.section-filter-controls h1{font-size:1.4rem;color:#244c6e;letter-spacing:-.035em;line-height:1.25;margin:0 0 .5rem}.section-filter-controls form{margin:0}.filtered-card-page{padding-top:.4rem}.khb-page .committee-card h2{margin-bottom:.15rem}.committee-card .khb-meeting{padding:.35rem 0 .2rem}.committee-card .committee-duty{margin-top:.5rem}.committee-card .khb-meeting:last-child{padding-bottom:0}.committee-card .khb-meeting p{margin:.15rem 0;line-height:1.5}.committee-card .missing-info{font-size:.8rem;color:#9aa5b3}

.section-filter-controls .page-title{margin-bottom:.5rem;align-items:center}.section-filter-controls .page-title h1{font-size:1.4rem;margin:0}.section-filter-controls .list-filter{margin-bottom:0}

/* Dashboard month groups and rarely used history view. */
.agenda-month{min-width:0}.agenda-month-title{position:sticky;top:calc(env(safe-area-inset-top,0px) + var(--dashboard-pane-height,140px));z-index:20;background:#f5f8fc;color:#7b8ba0;font-size:.85rem;font-weight:600;letter-spacing:.01em;padding:.65rem .1rem;margin:0 0 .4rem}.agenda-month+.agenda-month{margin-top:.65rem}.agenda-list .record-card.past-event{background:#f1f3f5;filter:grayscale(1);opacity:.7}.history-footer{margin:1.25rem 0 .5rem;text-align:center}.history-footer a,.history-back{font-size:.8rem;color:#7c8b9d;text-decoration:none}.history-footer a:hover,.history-back:hover{text-decoration:underline}.history-toolbar{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin:0 0 .5rem}.history-caption{font-size:.75rem;color:#94a0af}.filter-empty{color:#94a0af;font-size:.85rem;text-align:center;padding:1rem}

.dashboard-frozen-pane .history-toolbar{max-width:1200px;margin:0 auto;padding:0 1rem .6rem}

.user-list-filter{flex-direction:column}.user-list-filter .form-control{flex:none;width:100%;min-width:0}.user-card .ui-icon{color:#8593a3;margin-right:.35rem}.user-card a[href^="mailto:"],.user-card a[href^="tel:"]{font-size:.9rem;text-decoration:none}.user-card h2 .ui-icon{vertical-align:-2px}

.user-card h2{font-size:.95rem;font-weight:550}

.user-card{position:relative}.user-card>.role-pill{position:absolute;top:.9rem;right:1rem;margin:0}.user-card h2{padding-right:5.5rem}.meeting-heading-icon{width:20px;height:20px;display:inline-block;vertical-align:-4px;color:#4c70ad;margin-right:.4rem}.schedule-card .khb-meeting .khb-actions{margin-left:0}.booking-editor .delete-booking-btn{background:#fde9e9;color:#b64646;border:1px solid #f5d1d1}.booking-editor .delete-booking-btn:hover{background:#f9dada}.schedule-card .meeting-line{gap:0}

/* Compact booking editor actions: Delete left, Cancel and Save right. */
.booking-editor-dialog .booking-edit-actions,.booking-editor .booking-edit-actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:.5rem;padding-left:0;padding-right:0}.booking-edit-actions>.btn{min-width:0;white-space:nowrap;font-size:.85rem;padding:.65rem .75rem}.booking-edit-actions>.delete-booking-btn{margin-right:auto!important;padding:.65rem .55rem;font-size:.8rem;flex:0 0 auto}.booking-edit-actions>a,.booking-edit-actions>button:last-child{flex:0 1 auto}@media(max-width:360px){.booking-edit-actions>.btn{font-size:.78rem;padding:.6rem .5rem}.booking-edit-actions>.delete-booking-btn{font-size:.75rem;padding:.6rem .4rem}}

/* Explicit action columns prevent earlier modal button rules from forcing a wrap. */
.booking-editor .booking-edit-actions{display:grid!important;grid-template-columns:3.4rem 4rem minmax(0,1fr);gap:.4rem!important;align-items:center;padding:1rem 0 0!important}.booking-editor .booking-edit-actions>.btn{width:100%;min-width:0;margin:0!important;padding:.65rem .2rem!important;font-size:.8rem!important;white-space:nowrap;box-sizing:border-box}.booking-editor .booking-edit-actions>button:last-child{font-size:.85rem!important}.booking-editor .booking-edit-actions:not(:has(.delete-booking-btn)){grid-template-columns:4rem minmax(0,1fr)}@media(max-width:360px){.booking-editor .booking-edit-actions{grid-template-columns:3rem 3.5rem minmax(0,1fr);gap:.3rem!important}.booking-editor .booking-edit-actions>.btn{font-size:.75rem!important}.booking-editor .booking-edit-actions>button:last-child{font-size:.8rem!important}}

/* Compact schedule pencils and confirmed deletion within editors. */
.schedule-card .meeting-entry-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.4rem}.meeting-edit-pencil{display:flex;align-items:center;justify-content:center;width:28px;height:28px;color:#0066ff;font-size:.8rem;text-decoration:none;position:relative}.meeting-edit-pencil:before{content:"";position:absolute;inset:-6px}.meeting-edit-pencil:hover{background:#edf3f9;border-radius:6px}.meeting-edit-pencil:focus-visible{outline:2px solid #93b6e3;border-radius:6px}.editor-footer.editor-action-row{display:grid;grid-template-columns:3.4rem 4rem minmax(0,1fr);gap:.4rem;align-items:center;justify-content:normal}.editor-action-row>.btn{width:100%;min-width:0;margin:0!important;padding:.65rem .2rem!important;font-size:.8rem;white-space:nowrap}.editor-action-row>.editor-delete-btn{background:#fde9e9;color:#b64646;border:1px solid #f5d1d1}.editor-delete-btn:hover{background:#f9dada}.editor-action-row:not(:has(.editor-delete-btn)){grid-template-columns:4rem minmax(0,1fr)}@media(max-width:360px){.editor-footer.editor-action-row{grid-template-columns:3rem 3.5rem minmax(0,1fr);gap:.3rem}.editor-action-row>.btn{font-size:.75rem}}

.booking-acknowledgements{display:grid;gap:.25rem;margin:.5rem 0 .2rem}.acknowledgement-entry{display:flex;align-items:center;gap:.4rem;font-size:.78rem;line-height:1.4}.acknowledgement-entry.acknowledged{color:#6caa82}.acknowledgement-entry.pending{color:#94a0af}.acknowledgement-entry i{flex-shrink:0}

.schedule-card .meeting-line{color:#454b53;font-weight:400}.meeting-cells{display:inline-grid;grid-template-columns:5.8em 6.2em max-content;column-gap:.9em;align-items:center;font-family:inherit;font-size:inherit;font-weight:400;white-space:nowrap}.meeting-cells>span{position:relative;font:inherit}.meeting-cells>span+span:before{content:"|";position:absolute;left:-.6em;color:#9aa1aa}.schedule-card .khb-meeting+.meeting-section-title,.schedule-card .meeting-empty+.meeting-section-title{margin-top:1.1rem}.meeting-edit-pencil{color:#0066ff;font-size:.65rem;width:24px;height:26px}

.pending-ack-icon{display:inline-flex;align-items:center;vertical-align:-2px;margin-left:.3rem;color:#d99720}.pending-ack-icon .ui-icon{width:15px;height:15px;fill:#fff3d6}

.pending-ack-icon .ui-icon{width:18px;height:18px}

/* Keep history cards readable and use the same softened blue for schedule edits. */
.record-card.past-event,.agenda-list .record-card.past-event{background:#fff;border-color:#d9e1ea;filter:grayscale(.5);opacity:1}
.meeting-edit-pencil{opacity:.6}.meeting-edit-pencil:hover,.meeting-edit-pencil:focus-visible{opacity:1}
.admin-booking-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem}
.admin-booking-filter input[type=search]{grid-column:1/-1;width:100%;min-width:0}
.admin-booking-filter select{min-width:0;width:100%}
.admin-booking-filter button{white-space:nowrap}

/* Frost history cards without sacrificing legibility; keep admin edits available. */
.record-card.past-event,.agenda-list .record-card.past-event{background:#edf1f5;border-color:#d5dde6;filter:grayscale(.85);opacity:.9}
.past-event .admin-time-badge{background:#dfe5ec}
.admin-booking-filter{grid-template-columns:minmax(0,1fr)}

/* Clear month headings with the original card alignment. */
.agenda-month-title{font-size:1rem;color:#667d98}
.agenda-month+.agenda-month{margin-top:1rem}

.cleaning-page .agenda-month-title{top:var(--cleaning-pane-height,200px);font-size:1.1rem}.cleaning-card{padding:1.1rem 1.25rem;margin-bottom:.75rem}.cleaning-card h2{font-size:1.2rem;margin:.45rem 0}.cleaning-card p{margin:.3rem 0}
.cleaning-filter-row{display:flex;align-items:center;gap:.6rem}.cleaning-filter-row>form{flex:1;min-width:0}.cleaning-filter-row select{width:100%}.cleaning-add-menu{position:relative;flex:none}.cleaning-add-menu>summary{display:flex;align-items:center;justify-content:center;width:40px;height:40px;box-sizing:border-box;border-radius:7px;background:#4c70ad;color:#fff;font-size:1.65rem;line-height:1;cursor:pointer;list-style:none}.cleaning-add-menu>summary::-webkit-details-marker{display:none}.cleaning-add-menu nav{position:absolute;right:0;top:calc(100% + .4rem);width:235px;z-index:60;padding:.4rem;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 8px 24px #18334c20}.cleaning-add-menu nav a{display:block;padding:.7rem;color:#316293;text-decoration:none;font-size:.9rem;border-radius:6px}.cleaning-add-menu nav a:hover{background:#edf3f9}.cleaning-card{padding:.85rem 1rem;margin-bottom:.65rem}.cleaning-date{color:#4d6780;font-size:.9rem;font-weight:600;margin-bottom:.6rem;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.cleaning-card-row{display:flex;align-items:center;gap:.65rem}.cleaning-assignment{border-left:3px solid #b7cbe2;padding-left:.7rem;min-width:0;flex:1}.cleaning-page .cleaning-assignment h2{font-size:1.12rem;line-height:1.3;margin:0 0 .15rem;color:#244c6e}.cleaning-card .cleaning-assignment p{font-size:.78rem;color:#8493a5;line-height:1.35;margin:0}.cleaning-edit-link{display:inline-flex;align-items:center;gap:.25rem;flex:none;font-size:.8rem;color:#316293;text-decoration:none;padding:.4rem 0}.cleaning-edit-link .ui-icon{width:13px;height:13px}.cleaning-page .cleaning-current-week{background:#edf5ff;border-color:#b7cfe9}.cleaning-current-week .cleaning-assignment{border-left-color:#4c70ad}.cleaning-current-label{font-size:.68rem;font-weight:500;color:#4c70ad;background:#dceafa;padding:.15rem .4rem;border-radius:4px}.cleaning-editor{position:relative;min-width:0}.cleaning-editor h1{padding-right:2rem}.cleaning-editor-close{position:absolute;top:1rem;right:1rem;width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:#7c96b7;background:#edf3f9;border-radius:50%;font-size:1.5rem;text-decoration:none}.cleaning-editor form,.cleaning-editor label{min-width:0;max-width:100%}.cleaning-editor label{display:block;margin:.85rem 0}.cleaning-editor .form-control{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px}.cleaning-editor input[type=date]{display:block;appearance:none;-webkit-appearance:none;min-height:44px;max-inline-size:100%;min-inline-size:0}.cleaning-editor .cleaning-weeks-field{width:10rem;max-width:100%}.cleaning-editor .cleaning-change-start{display:flex;align-items:center;gap:.3rem;color:#7c9bc5;font-weight:500;list-style:none}.cleaning-change-start::-webkit-details-marker{display:none}.cleaning-change-start .ui-icon{width:13px;height:13px}.cleaning-editor .checkbox-label{display:flex;align-items:center;gap:.5rem}.cleaning-editor .checkbox-label input{width:auto;flex:none}
.cleaning-page .cleaning-card{display:block}
.cleaning-add-menu>summary svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round}.cleaning-add-menu nav{width:255px;max-width:calc(100vw - 3rem)}.cleaning-editor-close svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}.cleaning-date{font-size:1rem;white-space:nowrap;flex-wrap:nowrap;gap:.4rem;min-width:0}.cleaning-current-label{font-size:.77em;flex:none;white-space:nowrap}.cleaning-page .cleaning-seasonal-card{background:#fff3d9;border:1px solid #e8bc62;box-shadow:0 3px 12px #9e6b1710}.cleaning-season-label{display:inline-block;background:#f4c66c;color:#754205;font-size:.86rem;font-weight:700;line-height:1.35;border-radius:5px;padding:.3rem .55rem;margin-bottom:.6rem}.cleaning-seasonal-card .cleaning-date{font-size:1.12rem;color:#875b1c}.cleaning-seasonal-card .cleaning-assignment{border-left-color:#d59b37}.cleaning-form-actions{display:flex;align-items:center;justify-content:center;gap:1rem;margin:1.2rem 0 .2rem}.cleaning-editor .cleaning-form-actions .btn{margin:0;min-height:44px}.cleaning-day-save{font-size:1rem;padding:.8rem 1.25rem}.cleaning-reminder-note{text-align:center;font-size:.78rem;color:#8a95a3;margin:1rem 0 0;line-height:1.5}.cleaning-draft-heading{margin-top:1.6rem!important;margin-bottom:.4rem!important}.cleaning-draft-note{font-size:.8rem;color:#8a95a3;margin:0 0 1.2rem}.cleaning-day-actions{gap:.85rem;flex-wrap:nowrap}.cleaning-day-actions .btn{white-space:nowrap}@media(max-width:360px){.cleaning-day-actions .btn{padding:.7rem .8rem;font-size:.9rem}}
.cleaning-editor-close{border:1px solid #244c6e;box-sizing:border-box}.cleaning-editor-title{white-space:nowrap;overflow-wrap:normal;word-break:normal;min-width:0;box-sizing:border-box}.cleaning-editor-title>span{display:inline-block;white-space:nowrap}.cleaning-editor #cleaningDraftButton{display:inline-flex;align-items:center;justify-content:center;gap:.5rem}.cleaning-editor #cleaningDraftButton:disabled{background:#cbd2dc;border-color:#cbd2dc;color:#65758a;cursor:wait;opacity:1}.cleaning-draft-spinner{display:block;flex:none}.cleaning-draft-status{font-size:.8rem;color:#8493a5}.cleaning-form-actions:has(#cleaningDraftButton){flex-wrap:wrap}.cleaning-assignment-dates{font-size:1.1rem!important;color:#316293}.cleaning-assignment-mode{margin-top:1.8rem}.cleaning-mode-toggle{display:inline-flex;align-items:center;gap:.35rem;padding:0;border:0;background:transparent;color:#7c9bc5;font:inherit;font-size:.9rem;cursor:pointer;text-align:left}.cleaning-mode-toggle .ui-icon{width:13px;height:13px}#cleaningSwapPanel p{font-size:.9rem;color:#64748b;line-height:1.5}
.cleaning-current-label{background:#287d65;color:#fff;font-weight:600}.cleaning-original-cong{font-size:.95rem;color:#4d6780;margin:.4rem 0 1rem}.cleaning-original-cong strong{color:#244c6e}.cleaning-replace-note{font-size:.82rem;color:#8493a5;line-height:1.5;margin:.5rem 0 1rem}.cleaning-assignment-mode{margin-top:3rem}
