@keyframes booking-island-in {
    from { opacity: 0;  }
}

.booking-island {
    position: relative;
    animation: booking-island-in 0.2s ease-out both;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.booking-island > .card + .card {
    margin-top: 1.4rem;
}

@keyframes island-sweep {
    0%   { background-position: -40% 0; opacity: 1; }
    80%  { background-position: 140% 0; opacity: 1; }
    100% { background-position: 140% 0; opacity: 0; }

}
.booking-island::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #1f3a84 50%, transparent 100%);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    background-position: -40% 0;
    animation: island-sweep 0.2s ease-in-out 1 forwards;
    pointer-events: none;
    z-index: 1;
}

.filter-chip,
.start-chip,
.room-tab,
.icon-btn,
.quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.25;
    text-align: center;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.room-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
    color: #1b2f65;
}

.page-container {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
}

.content-stack {
    padding: 2.3rem 0 2.8rem;
    display: grid;
    gap: 1.4rem;
}

.card {
    position: relative;
    background: #ffffff;
    border: 1px solid #dce3f0;
    box-shadow: 0 6px 24px rgba(27, 47, 101, 0.08);
    padding: 1.4rem;
}

.main-header {
    background: #ffffff;
    border-bottom: 1px solid #dce3f0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    background: #1f3a84;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.24em;
    padding: 0.8rem 1rem;
    line-height: 1;
}

.brand-text {
    border-left: 1px solid #dce3f0;
    padding-left: 1rem;
}

.label {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: 0.65rem;
    color: #4d5f8f;
}

.brand-text .title {
    font-weight: 700;
    font-size: 1.05rem;
}

.toast {
    border: 1px solid;
    padding: 0.8rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-message { flex: 1; }

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.55;
    color: inherit;
}

.toast-close:hover { opacity: 1; }

.toast-info    { background: #edf3ff; color: #1f3a84; border-color: #c5d5fb; }
.toast-success { background: #edf8ef; color: #145f35; border-color: #bddfc7; }
.toast-error   { background: #fff0f0; color: #8a1a1a; border-color: #efc5c5; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #dce3f0;
    border-top-color: #1f3a84;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-on-dark {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
}

.action-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #1b2f65;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10;
    border-radius: inherit;
}

.rooms-loading-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4d5f78;
    padding: 0.5rem 0;
}

.error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 0.85rem 0;
    padding: 0.7rem 0.9rem;
    background: #fdecef;
    border: 1px solid #f3c9cd;
    border-left: 3px solid #c8322b;
    border-radius: 4px;
    color: #8f2620;
    font-size: 0.9rem;
    line-height: 1.45;
}

.location-card > .error-banner:last-child { margin-bottom: 0; }

.error-banner-retry {
    flex-shrink: 0;
    padding: 0.35rem 0.8rem;
    background: #ffffff;
    border: 1px solid #c8322b;
    border-radius: 4px;
    color: #c8322b;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.error-banner-retry:hover {
    background: #c8322b;
    color: #ffffff;
}

@keyframes skeleton-pulse {
    50% { opacity: 0.45; }
}

.skeleton-pulse {
    animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.sk {
    background: #dce3f0;
    border-radius: 3px;
    flex-shrink: 0;
}

.sk-row    { display: flex; align-items: center; gap: 0.5rem; }
.sk-col    { display: flex; flex-direction: column; gap: 0.5rem; }
.sk-between { display: flex; justify-content: space-between; align-items: flex-start; }
.sk-fill   { flex: 1; }
.sk-wrap   { flex-wrap: wrap; }
.sk-right  { text-align: right; }

.is-refreshing {
    position: relative;
    overflow: hidden;
}

.is-refreshing > *:not(.refresh-bar) {
    opacity: 0.65;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.is-refreshing::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #1f3a84 50%, transparent 100%);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    background-position: -40% 0;
    animation: refresh-sweep 1.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes refresh-sweep {
    0%   { background-position: -40% 0; }
    100% { background-position: 140% 0; }
}

.date-row {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    gap: 0.6rem;
}

.icon-btn {
    height: 56px;
    width: 56px;
    border: none;
    background: #eef3fc;
    color: #1f3a84;
    font-size: 1.9rem;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover:not(:disabled) {
    background: #dce8ff;
}

.icon-btn:active:not(:disabled) {
    transform: scale(0.93);
}

.date-center { text-align: center; }

.date-title {
    color: #1f3a84;
    font-size: clamp(1.15rem, 3.5vw, 1.85rem);
    font-weight: 700;
    /* No text-transform: capitalize — see app.css's identical rule for why. */
}

.quick-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dce3f0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1 1 6rem;
    border: 2px solid #dce3f0;
    background: #ffffff;
    height: 42px;
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 700;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.quick-btn:hover:not(:disabled):not(.active) {
    border-color: #1f3a84;
    background: #f8fafd;
}

.quick-btn.active {
    background: #1f3a84;
    color: #ffffff;
    border-color: #1f3a84;
}

.quick-btn.active:hover:not(:disabled) {
    background: #162d6a;
    border-color: #162d6a;
}

.quick-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.date-input {
    flex: 1 1 9rem;
    max-width: 100%;
    border: 2px solid #b8caec;
    background: #ffffff;
    color: #1f3a84;
    padding: 0 0.8rem;
    height: 42px;
    font-weight: 600;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem 1rem;
    border-bottom: 1px solid #dce3f0;
    padding-bottom: 1rem;
    margin-bottom: 1.1rem;
}

.section-head h2 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    color: #1f3a84;
}

.muted { color: #4d5f78; font-weight: 600; }

.location-head { align-items: flex-start; }

.location-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.finder-accordion-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #dce3f0;
    padding: 0 0 1rem;
    margin: 0 0 1.1rem;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.finder-accordion-trigger h2 {
    margin: 0.25rem 0 0;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.7rem, 4vw, 2.1rem);
    color: #1f3a84;
}

.finder-accordion-trigger:hover {
    background-color: #f4f7fd;
}

.finder-accordion-trigger:focus-visible {
    outline: 2px solid #1f3a84;
    outline-offset: 2px;
}

.finder-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
}

.finder-chevron {
    flex-shrink: 0;
    margin-left: 0.75rem;
    font-size: 1.1em;
    color: #1f3a84;
    transition: transform 0.2s ease;
}

.finder-chevron.collapsed {
    transform: rotate(-90deg);
}

.finder-accordion-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.2s ease;
}

.finder-accordion-body-inner {
    overflow: hidden;
}

.finder-body-collapsed {
    grid-template-rows: 0fr;
}

.finder-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: #1f3a84;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

.finder-title-wrap > span {
    min-width: 0;
    text-align: left;
}

.finder-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
    padding-left: 1rem;
}

.finder-meta .muted { display: block; }

.finder-meta-suitable { font-size: 0.85em; margin-top: 0.2rem; }

.finder-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.35rem;
}

.filter-label {
    margin-bottom: 0.55rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: #4d5f8f;
}

.finder-option-grid {
    display: grid;
    gap: 0.55rem;
}

.duration-grid,
.capacity-grid,
.room-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-chip,
.start-chip,
.room-tab {
    border: 2px solid #dce3f0;
    background: #ffffff;
    color: #1b2f65;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.location-grid .filter-chip {
    min-height: 48px;
    border-radius:0;
    padding: 0 0.75rem;
}

.filter-chip {
    min-height: 30px;
    border-radius:5px;
    padding: 0 0.75rem;
}

.filter-chip.active,
.room-tab.active {
    background: #1f3a84;
    border-color: #1f3a84;
    color: #ffffff;
}

.filter-chip:disabled {
    cursor: not-allowed;
    border-color: #e3e7ee;
    background: #f3f4f7;
    color: #a7b1c4;
    transform: none;
}

/* A disclosure toggle is never a selected duration: no .active fill even while open. */
.filter-chip-disclosure::after {
    content: "▾";
    margin-left: 0.35rem;
    display: inline-block;
    transition: transform 0.15s ease;
}

.filter-chip-disclosure[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.start-chip:hover,
.room-tab:hover:not(.active),
.filter-chip:hover:not(.active) {
    border-color: #1f3a84;
    transform: translateY(-1px);
}

.start-chip:hover {
    background: #1f3a84;
    color: #ffffff;
}

.start-chip:active,
.room-tab:active:not(:disabled),
.filter-chip:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.feature-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.capacity-pill,
.busy-pill,
.mismatch-pill,
.feature-chip,
.mine-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
}

.capacity-pill  { background: #eef3fc; color: #5b73a7; }
.busy-pill      { background: #cf5555; color: #ffffff; }
.mismatch-pill  { background: #98a2b3; color: #ffffff; }
.feature-chip   { border: 1px solid #c9d7f4; color: #476195; background: #f8fbff; }

.finder-results { display: grid; gap: 0.85rem; }

.finder-result { border: 2px solid; padding: 1rem 1.05rem; }

.finder-result-open     { border-color: #8dc5a3; background: rgba(221, 245, 229, 0.55); }
.finder-result-busy     { border-color: #cf5555; background: rgba(252, 236, 236, 0.85); }
.finder-result-mismatch { border-color: #c8d0db; background: rgba(238, 240, 244, 0.85); }

.finder-result-longterm {
    border-color: #a8c0f0;
    background: #f3f6fd;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.finder-result-longterm.finder-result-selected {
    border-color: #1f3a84;
    background: #e9effd;
}
.finder-result-longterm .finder-room-copy { flex: 1; min-width: 0; }
.finder-longterm-btn { flex-shrink: 0; align-self: center; }

.longterm-pill {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
    padding: 0.15rem 0.55rem; border-radius: 999px;
    background: #dce8ff; color: #1f3a84; border: 1px solid #a8c0f0;
    white-space: nowrap;
}
/* Grey, never red: an in-flight refresh must not read as "fully booked". */
.finder-result-loading  { border-color: #d8dee8; background: rgba(244, 246, 250, 0.85); }

.finder-result-mismatch .status-icon      { background: #98a2b3; }
.finder-result-mismatch .finder-room-count { color: #6a7385; }

.finder-result-loading .status-icon       { background: #c2cad6; }
.finder-result-loading .finder-room-count  { color: #aab2c0; }

.finder-result-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.finder-room-copy { flex: 1; }

.finder-room-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.finder-room-topline h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f3a84;
}

.status-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #ffffff;
    background: #2f8f58;
}

.finder-result-busy .status-icon    { background: #cf5555; }

/* Labels come from --show-more-label/--show-less-label, set inline from IStringLocalizer (::after can't render markup). */
.finder-room-description { margin: 0.45rem 0 0; color: #4d5f78; }
.finder-room-description summary {
    margin: 0;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.finder-room-description summary::-webkit-details-marker { display: none; }
.finder-room-description summary::after { content: var(--show-more-label); display: block; color: #1f3a84; font-weight: 600; }
.finder-room-description[open] summary {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.finder-room-description[open] summary::after { content: var(--show-less-label); margin-top: 0.3rem; }
/* Set by BookingPlatform.checkDescriptionClampOverflow (App.razor) when the text fits: hide the toggle. */
.finder-room-description.no-clamp-overflow summary { cursor: default; }
.finder-room-description.no-clamp-overflow summary::after { display: none; }

.finder-room-meta { min-width: 88px; text-align: right; }

.finder-room-count {
    font-size: 2rem;
    font-weight: 700;
    color: #2f8f58;
}

.finder-result-busy .finder-room-count { color: #b23e3e; }

.finder-starts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.start-chip { min-height: 44px; padding: 0 0.8rem; }

.finder-more,
.finder-empty-copy {
    color: #4d5f78;
}

.finder-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
}

.finder-empty-copy { margin: 0.8rem 0 0; font-style: italic; }

.schedule-head-separator {
    border-top: 1px solid #dce3f0;
    margin: 1.4rem 0 1.2rem;
}

.schedule-head {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.9rem;
}

.room-tab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.room-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem 0.85rem;
    text-align: center;
    overflow: hidden;
    min-height: 80px;
    background: #fff;
    border: 2px solid #dce3f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-tab:hover:not(:disabled):not(.active) {
    border-color: #1f3a84;
    background: #f8fafd;
}

.room-tab.active {
    background: #1f3a84;
    border-color: #1f3a84;
    color: #fff;
}

.room-tab.active:hover:not(:disabled) {
    background: #162d6a;
    border-color: #162d6a;
}

.room-tab-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

.room-tab.active .room-tab-name {
    color: #fff;
}

.room-tab-meta {
    font-size: 0.7rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    white-space: normal;
}

.room-tab.active .room-tab-meta {
    opacity: 0.85;
    color: #fff;
}

.timeline-head {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.9rem;
}

.room-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.05rem;
    color: #4d5f78;
}

.room-picture {
    width: 180px;
    height: 120px;
    object-fit: contain;
    background: #eef1f7;
    border-radius: 8px;
    flex-shrink: 0;
}

.room-summary-title {
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
    color: #1f3a84;
}

.room-summary-features { margin-top: 0; justify-content: flex-end; }

.room-description { max-width: 33rem; color: #4d5f78; }
.room-description summary {
    margin: 0;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.room-description summary::-webkit-details-marker { display: none; }
.room-description summary::after { content: var(--show-more-label); display: block; color: #1f3a84; font-weight: 600; }
.room-description[open] summary {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.room-description[open] summary::after { content: var(--show-less-label); margin-top: 0.35rem; }
/* Set by BookingPlatform.checkDescriptionClampOverflow (App.razor) when the text fits: hide the toggle. */
.room-description.no-clamp-overflow summary { cursor: default; }
.room-description.no-clamp-overflow summary::after { display: none; }

.timeline-grid { display: grid; gap: 0.6rem; }

.timeline-loading { padding: 1.25rem 0.25rem; margin-top: 0.5rem; font-size: 0.9rem; }

.slot {
    width: 100%;
    text-align: left;
    border: 2px solid;
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.05rem;
    background: #ffffff;
}

.slot:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #1f3a84;
}

.slot-time { width: 70px; flex-shrink: 0; font-weight: 700; font-size: 1.1rem; }
.slot-main { flex: 1; }

.slot-line,
.slot-topline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.slot-title { font-weight: 700; font-size: 1.05rem; }
.slot-sub   { opacity: 0.85; margin-top: 0.2rem; font-size: 0.92rem; }

.slot-free {
    border-style: solid;
    border-color: #80c49a;
    background: #f0faf3;
    color: #217745;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.slot-free:active { transform: scale(0.995); }

.slot-past {
    border-style: dashed;
    border-color: #d1d6df;
    background: #f3f4f7;
    /* Must stay >= 4.5:1 (AA) on this background. */
    color: #636d80;
    cursor: pointer;
    padding: 0.55rem 1.05rem;
    flex-wrap: nowrap;
}

.slot-past .slot-time {
    width: auto;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.slot-past:hover { background: #e8eaef; }

/* Deliberately not .slot-past, which is reserved for the collapsed past block (tests rely on it). */
.slot-in-progress {
    border-style: dashed;
    border-color: #d1d6df;
    background: #f3f4f7;
    color: #636d80;
    cursor: not-allowed;
}

.slot-past .slot-indicator {
    width: auto;
    height: auto;
    background: none;
    color: inherit;
    opacity: 1;
    font-size: 1.3rem;
    font-weight: 700;
}

.timeline-past-expanded {
    display: grid;
    gap: 0.6rem;
    padding-left: 1.25rem;
    margin-top: -0.1rem;
    border-left: 2px dashed #d1d6df;
}

.slot.slot-past-detail { cursor: default; }

.slot-indicator {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2f8f58;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.slot-free:hover .slot-indicator { opacity: 1; }
.slot-free:hover { border-color: #217745; background: #e3f5e9; }
.slot-mine:hover { background: #d4dcf7; }

.slot-mine {
    border-color: #1f3a84;
    background: #e9effd;
    color: #1f3a84;
    cursor: pointer;
}

.slot-busy {
    border-color: #a83232;
    background: linear-gradient(
        135deg,
        rgba(205, 76, 76, 0.18),
        rgba(205, 76, 76, 0.08)
    ),
    repeating-linear-gradient(
        135deg,
        rgba(205, 76, 76, 0.2),
        rgba(205, 76, 76, 0.2) 10px,
        rgba(205, 76, 76, 0.1) 10px,
        rgba(205, 76, 76, 0.1) 20px
    );
    color: #6e2222;
    cursor: default;
}

.slot-forbidden {
    border-color: #555c64;
    background: repeating-linear-gradient(
        135deg,
        rgba(85, 92, 100, 0.18),
        rgba(85, 92, 100, 0.18) 10px,
        rgba(85, 92, 100, 0.08) 10px,
        rgba(85, 92, 100, 0.08) 20px
    );
    color: #2f343a;
    cursor: not-allowed;
}

.slot-cleaning {
    border-color: #8a97a8;
    background: repeating-linear-gradient(
        45deg,
        rgba(138, 151, 168, 0.22),
        rgba(138, 151, 168, 0.22) 8px,
        rgba(138, 151, 168, 0.06) 8px,
        rgba(138, 151, 168, 0.06) 16px
    );
    color: #45505e;
    cursor: default;
}

.busy-tag {
    display: inline-block;
    background: #a83232;
    color: #ffffff;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    margin-bottom: 0.28rem;
}

.mine-tag { background: #1f3a84; color: #ffffff; }
.slot-lock { font-size: 1rem; opacity: 0.55; }

.timeline-now-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.1rem 0;
    pointer-events: none;
}

.timeline-now-line::before {
    content: '';
    flex: 1;
    height: 2px;
    background: #1f3a84;
    opacity: 0.35;
}

.timeline-now-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #1f3a84;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: #e5ebf8;
    padding: 0.18rem 0.5rem;
    white-space: nowrap;
}

.legend-row {
    margin-top: 0.95rem;
    border-top: 1px solid #dce3f0;
    padding-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #4d5f78;
    font-size: 0.92rem;
}

.legend-box {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.legend-box.available         { background: #f0faf3; border: 2px dashed #80c49a; }
.legend-box.mine              { background: #e9effd; border: 2px solid #1f3a84; }
.legend-box.busy              { background: #f8e7e7; border: 2px solid #a83232; }
.legend-box.pending-approval  { background: #fff8e1; border: 2px solid #e6a817; }
.legend-box.forbidden         { background: repeating-linear-gradient(135deg, #f3f4f7, #f3f4f7 4px, #dfe2e8 4px, #dfe2e8 8px); border: 2px solid #d1d6df; }
.legend-box.past              { background: #f3f4f7; border: 2px dashed #d1d6df; }

.slot-pending-approval {
    border-color: #e6a817;
    background: #fff8e1;
    color: #7a4e00;
    cursor: pointer;
}

.slot-pending-approval:hover { background: #fef0c0; }

.busy-tag.pending-tag {
    background: #e6a817;
    color: #fff;
}

.footnote {
    text-align: center;
    color: #4d5f78;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-footer {
    margin-top: 1.2rem;
    background: #1f3a84;
    color: #ffffff;
}

.footer-inner {
    padding: 1.8rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 47, 101, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.dialog-panel {
    background: #ffffff;
    border: 2px solid #c8d3e8;
    width: min(540px, 100%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 40px rgba(27, 47, 101, 0.18);
    animation: dlg-in 0.15s ease;
}

.dialog-panel-sm { width: min(400px, 100%); }

@keyframes dlg-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.dialog-header { display: flex; flex-direction: column; gap: 0.35rem; }

.dialog-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1b2f65;
    line-height: 1.1;
    margin: 0;
}

.dialog-description { color: #5a6a8a; font-size: 0.97rem; margin: 0; }
.cancel-warn        { color: #c0392b; font-size: 0.88rem; margin-top: 0.25rem; }

.dialog-body { display: flex; flex-direction: column; gap: 1.25rem; }
.dialog-field { display: flex; flex-direction: column; gap: 0.4rem; }

.field-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #5a6a8a;
}

.field-label-note {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85em;
}

.field-hint {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #636d80;
    text-align: right;
}

.field-readonly {
    min-height: 3rem;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #eef3fc;
    border: 2px solid #dce3f0;
    color: #2f487e;
    font-size: 1rem;
}

.field-input {
    height: 3rem;
    border: 2px solid #c8d3e8;
    padding: 0 0.75rem;
    font-size: 1rem;
    color: #1b2f65;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.field-input:focus { border-color: #1f3a84; }

.field-select {
    height: 3rem;
    border: 2px solid #c8d3e8;
    padding: 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1b2f65;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.field-select:focus { border-color: #1f3a84; }
.field-select option:disabled { color: #a7b1c4; }

.start-end-fields {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 0.75rem;
}

.start-end-field { display: flex; flex-direction: column; gap: 0.4rem; }

.start-end-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    color: #a7b1c4;
    font-weight: 600;
}

.duration-select-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.duration-hint { font-size: 0.85rem; color: #5a6a8a; margin: 0.2rem 0 0; }

.end-time-picker {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: #f4f7fd;
    border: 1px solid #dce3f0;
}

.end-time-picker-label { margin-bottom: 0.1rem; }

.end-time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.dialog-timeline { display: flex; flex-direction: column; gap: 0.3rem; }

.dialog-timeline-track {
    position: relative;
    height: 2.5rem;
    background: #f0faf3;
    border: 2px solid #80c49a;
    overflow: hidden;
}

.dialog-timeline-selected {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f3a84;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
}

.dialog-timeline-block {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6e2222;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
}

.dialog-timeline-busy {
    background: repeating-linear-gradient(135deg, rgba(168,50,50,0.25), rgba(168,50,50,0.25) 8px, rgba(168,50,50,0.12) 8px, rgba(168,50,50,0.12) 16px);
    border-left: 2px solid #a83232;
    border-right: 2px solid #a83232;
}

.dialog-timeline-forbidden {
    background: repeating-linear-gradient(135deg, rgba(85,92,100,0.22), rgba(85,92,100,0.22) 8px, rgba(85,92,100,0.09) 8px, rgba(85,92,100,0.09) 16px);
    border-left: 2px solid #555c64;
    border-right: 2px solid #555c64;
    color: #2f343a;
}

.dialog-timeline-marks {
    position: relative;
    height: 1rem;
}

.dialog-timeline-mark {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: #5a6a8a;
    white-space: nowrap;
}

.dialog-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    font-size: 0.97rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-outline {
    background: transparent;
    border-color: #c8d3e8;
    color: #1b2f65;
}

.btn-outline:hover:not(:disabled) { border-color: #1f3a84; background: #f0f4fc; }

.btn-primary {
    background: #1f3a84;
    color: #ffffff;
    border-color: #1f3a84;
}

.btn-primary:hover:not(:disabled) { background: #162d6a; border-color: #162d6a; }

.btn-danger {
    background: #c0392b;
    color: #ffffff;
    border-color: #c0392b;
}

.btn-danger:hover:not(:disabled) { background: #a93226; border-color: #a93226; }

@media (max-width: 900px) {
    .finder-filters,
    .room-tab-grid,
    .room-picker-grid,
    /* Nested inside .finder-filters, so its 2-column override doesn't reach these grids. */
    .duration-grid,
    .capacity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .room-summary,
    .finder-result-head {
        flex-direction: column;
    }

    .finder-room-meta   { text-align: left; }
    .room-summary-features { justify-content: flex-start; }

    .finder-accordion-trigger { flex-wrap: wrap; }
    .finder-meta { margin-left: 0; padding-left: 0; align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
    .header-inner,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .card { padding: 1.1rem; }

    .finder-filters,
    .duration-grid,
    .capacity-grid,
    .room-picker-grid {
        grid-template-columns: 1fr;
    }

    .room-tab-grid,
    .location-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .quick-btn,
    .date-input { flex: 0 0 auto; width: 100%; }

    .slot,
    .finder-room-topline { align-items: flex-start; }

    .slot:not(.slot-past) { flex-wrap: wrap; }
    .slot-time { width: auto; }

    .dialog-panel { padding: 1.25rem; }

    .duration-select-grid,
    .end-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .start-end-fields { grid-template-columns: 1fr; }
    .start-end-separator { display: none; }

    .dialog-footer { flex-direction: column; }
    .btn { width: 100%; }
    .mine-tag { display: none; }
}

@media (max-width: 480px) {
    .page-container { width: min(1080px, calc(100% - 1.2rem)); }

    .card { padding: 0.9rem; }

    .icon-btn { width: 48px; height: 48px; font-size: 1.6rem; }

    .date-row { grid-template-columns: 48px 1fr 48px; }

    .location-grid { grid-template-columns: 1fr; }
}

.long-term-panel { padding: 1.25rem; }

.long-term-login-prompt { padding: 1.5rem 0; color: #4d5f78; }
.long-term-login-prompt a { color: #1f3a84; }

.long-term-body { display: flex; flex-direction: column; gap: 1.25rem; }

.hurtigvalg-row { display: flex; flex-direction: column; gap: 0.4rem; }
.quick-chip-row  { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.long-term-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.calendar-side { display: flex; flex-direction: column; gap: 0.75rem; }

.calendar-nav-row {
    display: flex; align-items: center; gap: 0.5rem;
}
.calendar-month-headers {
    flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.calendar-month-title {
    font-size: 1rem; font-weight: 600; color: #1f3a84; text-align: center;
}
.cal-nav-btn {
    background: none; border: 1px solid #dce3f0; border-radius: 6px;
    padding: 0.2rem 0.6rem; cursor: pointer; font-size: 1.1rem; color: #1f3a84;
    line-height: 1.5; flex-shrink: 0;
}
.cal-nav-btn:hover { background: #f3f6fc; }

.calendar-grid-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.calendar-month { display: flex; flex-direction: column; gap: 0.3rem; }
.calendar-month-label-mobile { display: none; font-size: 0.9rem; font-weight: 600; color: #3a4d6e; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-dow {
    text-align: center; font-size: 0.7rem; font-weight: 600;
    color: #4d5f78; padding: 0.2rem 0;
}

.cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; border-radius: 6px; border: 1px solid transparent;
    cursor: pointer; background: transparent; transition: background 0.1s;
}
.cal-day:disabled { cursor: default; }

.cal-day-available { color: #1f3a84; }
.cal-day-available:hover:not(:disabled) { background: #eef2fb; border-color: #c5d0ea; }

.cal-day-past, .cal-day-unavailable { color: #b0b8c9; }

.cal-day-occupied { background: #fff0f0; color: #a83232; border-color: #f0baba; }
.cal-day-occupied.cal-day-hovered { background: #ffdddd; border-color: #a83232; box-shadow: inset 0 0 0 2px #a83232; }

.cal-day-own { background: #dce8ff; color: #4a4a4a; border-color: #c0c0c0; font-weight: 600; }
.cal-day-own.cal-day-hovered { background: #c8d8ff; border-color: #888; box-shadow: inset 0 0 0 2px #888; }
.cal-day-pending-approval { background: #fff8e1; color: #7a4e00; border-color: #e6a817; font-weight: 600; cursor: pointer; }
.cal-day-pending-approval:hover { background: #fef0c0; }
.cal-day-pending-approval.cal-day-hovered { background: #fef0c0; border-color: #7a4e00; box-shadow: inset 0 0 0 2px #7a4e00; }

.cal-day-selected, .cal-day-start, .cal-day-end {
    background: #1f3a84; color: #999; border-color: #1f3a84;
}
.cal-day-in-range { background: #1f3a84; color: #aaa; border-color: #b8ccf0; border-radius: 0; }
.cal-day-start { border-radius: 6px 0 0 6px; }
.cal-day-end   { border-radius: 0 6px 6px 0; }

.cal-day-forbidden {
    background: repeating-linear-gradient(
        45deg,
        #ffcccc,
        #ffcccc 2px,
        #ff9999 2px,
        #ff9999 4px
    ) !important;
    color: #8b0000;
    border-color: #a83232 !important;
    font-weight: 600;
    cursor: not-allowed;
}

.cal-legend-row { display: flex; gap: 1rem; font-size: 0.78rem; color: #4d5f78; }
.cal-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.cal-legend-dot {
    width: 12px; height: 12px; border-radius: 3px; border: 1px solid transparent;
}
.cal-legend-dot.selected { background: #1f3a84; }
.cal-legend-dot.occupied { background: #fff0f0; border-color: #f0baba; }
.cal-legend-dot.own { background: #dce8ff; border-color: #c0c0c0; }
.cal-legend-dot.pending-approval { background: #fff8e1; border-color: #e6a817; }
.cal-legend-dot.forbidden {
    background: repeating-linear-gradient(
        45deg,
        #ffcccc,
        #ffcccc 1px,
        #ff9999 1px,
        #ff9999 2px
    );
    border-color: #a83232;
}

.long-term-right-panel {
    display: flex; flex-direction: column; gap: 0.85rem;
    padding: 1rem; border: 1px solid #dce3f0; border-radius: 10px;
    background: #f8fafd;
}

.period-hint { color: #4d5f78; font-size: 0.88rem; font-style: italic; margin: 0; }
.period-summary { font-size: 0.92rem; margin: 0; line-height: 1.5; }

.upcoming-bookings { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }

.upcoming-booking-row {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem 1rem; border: 1px solid #dce3f0; border-radius: 8px;
    background: #fff;
}
.upcoming-booking-row.mine {
    border-color: #9a9a9a;
    background: #f0f0f0;
    border-left: 3px solid #666666;
}
.upcoming-booking-row.row-hovered {
    border-color: #1f3a84;
    box-shadow: inset 0 0 0 2px #1f3a84;
}
.upcoming-booking-icon { font-size: 1.1rem; flex-shrink: 0; padding-top: 0.1rem; }
.upcoming-booking-info { flex: 1; min-width: 0; }
.upcoming-booking-title { font-weight: 600; color: #1f3a84; margin-bottom: 0.15rem; }

.cancel-btn { flex-shrink: 0; align-self: center; }
.btn-sm { padding: 0.25rem 0.7rem; font-size: 0.8rem; }

.picture-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.picture-viewer-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 90vw;
    max-height: 90vh;
}

.picture-viewer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.picture-viewer-counter {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 0.95rem;
    opacity: 0.85;
    /* Balances the close button's width on the other side so the counter stays visually centered. */
    margin-left: 2rem;
}

.picture-viewer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.picture-viewer-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.picture-viewer-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 75vh;
}

.picture-viewer-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.picture-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.picture-viewer-nav:hover {
    background: rgba(0, 0, 0, 0.65);
}

.picture-viewer-prev { left: 0.5rem; }
.picture-viewer-next { right: 0.5rem; }

.picture-viewer-caption {
    margin: 0;
    max-width: 100%;
    color: #fff;
    font-size: 1.15rem;
    text-align: center;
}

@media (max-width: 600px) {
    .picture-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    .picture-viewer-caption {
        font-size: 1rem;
    }
}

@media (max-width: 900px) {
    .long-term-layout { grid-template-columns: 1fr; }
    .calendar-grid-pair { grid-template-columns: 1fr; }
    .calendar-month-headers { grid-template-columns: 1fr; }
    .calendar-month-headers .calendar-month-title:last-child { display: none; }
    .calendar-month-label-mobile { display: block; }
}

.ap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    color: #56688f;
    font-size: 0.9rem;
}
.ap-loading-spinner {
    width: 2rem; height: 2rem;
    border: 3px solid #dce3f0;
    border-top-color: #1b2f65;
    border-radius: 50%;
    animation: ap-spin 0.8s linear infinite;
}
@keyframes ap-spin { to { transform: rotate(360deg); } }

.ap-status-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.5rem;
    border-left: 4px solid #c8d3e8;
    background: #fff;
}
.ap-status-card--success { border-left-color: #1a7a4a; }
.ap-status-card--warn    { border-left-color: #c8322b; }
.ap-status-card--resolved { border-left-color: #1b2f65; }

.ap-status-icon {
    flex-shrink: 0;
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%;
    background: #eef3fc;
    color: #1b2f65;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ap-status-icon--success { background: #d4edda; color: #1a7a4a; }
.ap-status-card--warn .ap-status-icon { background: #fdecef; color: #c8322b; }

.ap-status-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #56688f;
    background: #eef3fc;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.5rem;
}
.ap-status-badge--success { background: #d4edda; color: #1a7a4a; }
.ap-status-badge--warn { background: #fff8e1; color: #7a4e00; }
.ap-status-badge--danger { background: #fdecef; color: #c8322b; }
.ap-status-badge--muted { background: #eef3fc; color: #56688f; }
.ap-status-card--warn .ap-status-badge { background: #fdecef; color: #c8322b; }

.ap-status-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1b2f65;
    margin: 0 0 0.5rem;
}
.ap-status-sub {
    font-size: 0.9rem;
    color: #56688f;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

.ap-review {
    width: 100%;
}

.ap-review-header {
    background: #1b2f65;
    padding: 2rem 2.5rem;
    width: 100%;
}
.ap-review-header-inner { max-width: 100%; }
.ap-review-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.4rem;
}
.ap-review-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem;
    line-height: 1.25;
}
.ap-review-from {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.ap-review-from strong { color: rgba(255,255,255,0.92); font-weight: 600; }

.ap-review-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
}

.ap-review-left {
    padding: 2rem 2.5rem;
    border-right: 1px solid #dce3f0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ap-detail-block {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f3f9;
}
.ap-detail-block:first-child { border-top: 1px solid #f0f3f9; }
.ap-detail-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9aaabf;
    margin-bottom: 0.2rem;
}
.ap-detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1b2f65;
}
.ap-detail-value--date {
    font-size: 1rem;
    font-weight: 600;
}

.ap-review-right {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: flex-start;
}

.ap-requester-comment {
    border-left: 4px solid #F57EB6;
    padding: 1rem 1.25rem;
    background: #fdf6fb;
}
.ap-requester-comment-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #840B55;
    margin-bottom: 0.5rem;
}
.ap-requester-comment-text {
    margin: 0;
    font-size: 0.9375rem;
    color: #1b2f65;
    line-height: 1.65;
    font-style: italic;
}

.ap-error {
    background: #fdecef;
    border: 1px solid #f0c6cf;
    color: #b6243d;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.ap-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.ap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}
.ap-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.ap-btn--approve {
    background: #1a7a4a;
    color: #fff;
    border-color: #1a7a4a;
}
.ap-btn--approve:hover:not(:disabled) { background: #155c38; border-color: #155c38; }

.ap-btn--reject {
    background: #c8322b;
    color: #fff;
    border-color: #c8322b;
}
.ap-btn--reject:hover:not(:disabled) { background: #a8251f; border-color: #a8251f; }

.ap-btn--ghost {
    background: #fff;
    color: #1b2f65;
    border-color: #c8d3e8;
}
.ap-btn--ghost:hover:not(:disabled) { background: #f0f4ff; border-color: #1b2f65; }

.ap-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ap-comment-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5a6a8a;
}
.ap-comment-required {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9em;
    color: #b3392f;
}
.ap-comment-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #c8d3e8;
    font-size: 0.9375rem;
    color: #1b2f65;
    background: #fff;
    resize: vertical;
    min-height: 6rem;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.ap-comment-textarea:focus { border-color: #1b2f65; }
.ap-comment-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
}

.ap-reschedule-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ap-reschedule-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ap-reschedule-row .date-input { margin-left: 0; width: 100%; }

.ap-spinner {
    display: inline-block;
    width: 1rem; height: 1rem;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ap-spin 0.7s linear infinite;
    flex-shrink: 0;
}
.ap-btn--ghost .ap-spinner {
    border-color: rgba(27,47,101,0.25);
    border-top-color: #1b2f65;
}

@media (max-width: 700px) {
    .ap-review-body { grid-template-columns: 1fr; }
    .ap-review-left { border-right: none; border-bottom: 1px solid #dce3f0; padding: 1.5rem 1.25rem; }
    .ap-review-right { padding: 1.5rem 1.25rem; }
    .ap-review-header { padding: 1.5rem 1.25rem; }
    .ap-review-title { font-size: 1.25rem; }
    .ap-status-card { padding: 1.5rem 1.25rem; flex-direction: column; gap: 1rem; }
}

.ap-page-card {
    background: #fff;
    border: 1px solid #dce3f0;
    box-shadow: 0 6px 24px rgba(27,47,101,0.08);
    overflow: hidden;
    width: 100%;
}

.mb-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mb-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #dce3f0;
    background: #ffffff;
    color: #1b2f65;
    height: 42px;
    padding: 0 1.1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.mb-tab:hover:not(.active) { border-color: #b8caec; background: #f0f4fc; }
.mb-tab.active { background: #1f3a84; color: #ffffff; border-color: #1f3a84; }

.mb-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #eef3fc;
    color: #56688f;
    font-size: 0.75rem;
    font-weight: 700;
}
.mb-tab.active .mb-tab-count { background: rgba(255, 255, 255, 0.22); color: #ffffff; }

.mb-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1b2f65;
    margin: 1.5rem 0 1rem;
}

.mb-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mb-row {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #dce3f0;
    border-left: 4px solid #c8d3e8;
    box-shadow: 0 6px 24px rgba(27, 47, 101, 0.06);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.mb-row:hover { box-shadow: 0 10px 30px rgba(27, 47, 101, 0.12); }

.mb-row--upcoming { border-left-color: #1f3a84; }
.mb-row--past     { border-left-color: #c8d3e8; }
.mb-row--success  { border-left-color: #1a7a4a; }
.mb-row--warn     { border-left-color: #e6a817; }
.mb-row--danger   { border-left-color: #c8322b; }
.mb-row--muted    { border-left-color: #9aaabf; }
.mb-row--resolved { border-left-color: #1b2f65; }

.mb-row--past .mb-datechip { background: #f1f4fa; color: #56688f; }
.mb-row--past .mb-title    { color: #56688f; }

.mb-row--other { border-left-color: #b98a12; background: #fffaf0; }
.mb-row--other .mb-datechip { background: #fdf2da; color: #8a6100; }

.mb-owner-badge {
    /* Opts out of .mb-body's align-items: stretch, which stretched the badge to full width. */
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #8a6100;
    background: #fdf2da;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.2rem;
}

.mb-datechip {
    flex-shrink: 0;
    width: 3.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0;
    background: #eef3fc;
    color: #1f3a84;
    text-align: center;
    line-height: 1;
}
.mb-datechip-month {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.mb-datechip-day {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0.1rem 0;
}
.mb-datechip-weekday {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4d5f8f;
}
.mb-datechip-year {
    font-size: 0.58rem;
    font-weight: 700;
    color: #636d80;
}

.mb-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
}

.mb-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.02rem;
    color: #1b2f65;
    overflow-wrap: anywhere;
}

.mb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.88rem;
    color: #56688f;
}
.mb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.mb-meta-icon { flex-shrink: 0; opacity: 0.7; }

.mb-time {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f3a84;
    background: #eef3fc;
    padding: 0.2rem 0.6rem;
}

.mb-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.mb-action--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}
.mb-action--stack .btn { white-space: nowrap; }

.mb-row .ap-status-badge { margin-bottom: 0.35rem; }
.mb-badge-row { display: flex; align-items: center; }

.mb-empty {
    padding: 2.25rem 1.5rem;
    text-align: center;
    color: #56688f;
    background: #ffffff;
    border: 1px dashed #c8d3e8;
}
.mb-empty p { margin: 0; }
.mb-empty-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}
.mb-empty-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.mb-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}
.mb-pager-info {
    font-size: 0.85rem;
    font-weight: 600;
    color: #56688f;
    min-width: 8rem;
    text-align: center;
}
.mb-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid #dce3f0;
    background: #ffffff;
    color: #1f3a84;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.mb-pager-btn:hover:not(:disabled) { border-color: #1f3a84; background: #f0f4fc; }
.mb-pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 640px) {
    .mb-row { flex-wrap: wrap; gap: 0.85rem; }
    .mb-datechip { flex-direction: row; width: auto; gap: 0.5rem; padding: 0.35rem 0.7rem; }
    .mb-datechip-day { font-size: 1.1rem; margin: 0; }
    .mb-action { width: 100%; }
    .mb-action .btn { width: 100%; }
}

.plan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.plan-location-label { font-weight: 600; color: #1b2f65; margin-right: 0.4rem; }

.plan-location-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dce3f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95rem;
    color: #1b2f65;
}

.plan-view-toggle { display: inline-flex; border: 1px solid #dce3f0; border-radius: 8px; overflow: hidden; margin-left: auto; }
.plan-longterm-toggle { margin-left: 0; margin-bottom: 1rem; }

.plan-view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #ffffff;
    color: #56688f;
    font-weight: 600;
    cursor: pointer;
}

.plan-view-btn.active { background: #1f3a84; color: #ffffff; }
.plan-view-btn:not(.active):hover { background: #f0f4fc; }

.plan-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }

.plan-main { min-width: 0; overflow-x: auto; }

.plan-side {
    position: sticky;
    top: 1rem;
    background: #ffffff;
    border: 1px solid #eef1f8;
    border-radius: 12px;
    padding: 1.25rem;
}

.plan-side-empty { color: #56688f; font-size: 0.9rem; }

.plan-detail { display: flex; flex-direction: column; }
.plan-detail-header { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.plan-detail-title { font-size: 1.1rem; margin: 0 0 0.5rem; color: #1b2f65; }
.plan-detail-meta { font-size: 0.9rem; color: #56688f; margin-bottom: 0.25rem; }

.plan-detail-divider { border: none; border-top: 1px solid #eef1f8; margin: 1.25rem 0 1rem; }
.plan-detail-fullwidth { width: 100%; box-sizing: border-box; }

.plan-side-section { margin: 1rem 0; }
.plan-side-section-heading {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.plan-side-section-heading--danger { color: #c8322b; }
.plan-side-section-heading--muted { color: #56688f; }

.plan-conflict-card {
    padding: 0.75rem 0.9rem;
    background: #fdecef;
    border: 1px solid #f5c2ca;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}
.plan-conflict-card-header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.plan-conflict-card-name { font-weight: 700; color: #1b2f65; }
.plan-conflict-card-date { font-size: 0.8rem; color: #a8251f; flex-shrink: 0; }
.plan-conflict-card-title { font-size: 0.85rem; color: #56688f; margin-top: 0.15rem; }

.plan-resource-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: #ffffff;
    border: 1px solid #eef1f8;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}
.plan-resource-card-name { font-weight: 700; color: #1b2f65; }
.plan-resource-card-type { font-size: 0.8rem; color: #56688f; margin-top: 0.15rem; }

.plan-resource-pill {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}
.plan-resource-pill--free { background: #d4edda; color: #1a7a4a; }
.plan-resource-pill--booked { background: #eef3fc; color: #56688f; }

.plan-timeline { min-width: 640px; }

.plan-timeline-header { display: flex; margin-bottom: 0.35rem; }
.plan-timeline-header-label { width: 180px; flex-shrink: 0; }
.plan-timeline-header-days { flex: 1; display: flex; }
.plan-timeline-day-label {
    flex: 1;
    font-size: 0.75rem;
    color: #56688f;
    text-align: center;
    padding: 0.25rem 0;
}

.plan-timeline-row { display: flex; align-items: stretch; border-top: 1px solid #eef1f8; }
.plan-timeline-row-label {
    width: 180px;
    flex-shrink: 0;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1b2f65;
    line-height: 1.25;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
}

.plan-timeline-row-track { position: relative; flex: 1; min-height: 52px; display: flex; }
.plan-timeline-row-track--lanes { flex-direction: column; min-height: 0; }
.plan-timeline-day-gridline { flex: 1; border-left: 1px solid #f1f4fa; }
.plan-timeline-row-track--lanes .plan-timeline-day-gridline { position: absolute; top: 0; bottom: 0; height: 100%; }

.plan-timeline-lane { position: relative; min-height: 52px; }
.plan-timeline-lane + .plan-timeline-lane { border-top: 1px dashed #f1f4fa; }

.plan-block {
    position: absolute;
    top: 6px;
    bottom: 6px;
    border-radius: 6px;
    border: none;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    overflow: hidden;
    text-align: left;
    cursor: default;
}

.plan-block-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.plan-block-time { display: block; font-weight: 700; font-size: 0.7rem; line-height: 1.2; white-space: nowrap; }
.plan-timeline--hourly .plan-block { padding: 0.25rem 0.3rem; }
.plan-timeline--hourly .plan-block-title { font-size: 0.7rem; line-height: 1.2; }

.plan-block--booking { background: #dce3f0; color: #56688f; }

.plan-block--approval { cursor: pointer; color: #ffffff; }
.plan-block--pending { background: #e6a817; }
.plan-block--approved { background: #1a7a4a; }
.plan-block--rejected { background: #9aaabf; }
/* Conflicted blocks keep their status color; only the actually-overlapping span (.plan-block-conflict-segment) renders red. */
.plan-block--conflict { box-shadow: 0 0 0 2px #c8322b; }
.plan-block--selected { outline: 2px solid #1b2f65; outline-offset: 1px; z-index: 2; }
.plan-block-conflict-marker { position: absolute; top: 2px; right: 4px; }
.plan-block-conflict-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #c8322b;
    opacity: 0.75;
    pointer-events: none;
}

.plan-timeline--hourly { min-width: 860px; }

.plan-timeline-hour-label {
    flex: 1;
    font-size: 0.7rem;
    color: #56688f;
    text-align: left;
    padding: 0.25rem 0 0.25rem 0.25rem;
    border-left: 1px solid #f1f4fa;
}

.plan-day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }

.plan-day-strip { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.plan-day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #dce3f0;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    color: #1b2f65;
    cursor: pointer;
}
.plan-day-chip:hover { background: #f0f4fc; }
.plan-day-chip--active { background: #1b2f65; border-color: #1b2f65; color: #ffffff; font-weight: 600; }
.plan-day-chip-count {
    background: #eef3fc;
    color: #56688f;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
}
.plan-day-chip--active .plan-day-chip-count { background: rgba(255, 255, 255, 0.9); color: #1b2f65; }

.plan-day-empty-note { font-size: 0.85rem; color: #56688f; margin-bottom: 0.6rem; }

.plan-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.85rem;
    font-size: 0.75rem;
    color: #56688f;
}
.plan-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.plan-legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.plan-legend-swatch--pending { background: #e6a817; }
.plan-legend-swatch--approved { background: #1a7a4a; }
.plan-legend-swatch--rejected { background: #9aaabf; }
.plan-legend-swatch--conflict { background: #c8322b; }
.plan-legend-swatch--booking { background: #dce3f0; }

.plan-week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }

.plan-timeline-row-label--clickable {
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    border-radius: 6px;
}
.plan-timeline-row-label--clickable:hover { background: #f0f4fc; }

.plan-block-overlap-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #c8322b;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
}

.plan-free-rooms-count { color: #1b2f65; font-size: 0.9rem; font-weight: 600; }

.plan-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.plan-month-nav-btn {
    width: 36px; height: 36px;
    border: 1px solid #dce3f0;
    background: #ffffff;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #1f3a84;
    cursor: pointer;
}
.plan-month-nav-btn:hover { background: #f0f4fc; }
.plan-month-title { font-weight: 600; color: #1b2f65; text-transform: capitalize; }

.plan-month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.75rem;
    color: #56688f;
    text-align: center;
    margin-bottom: 0.35rem;
}

.plan-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.plan-month-cell {
    position: relative;
    min-height: 56px;
    padding: 0.35rem;
    border-radius: 6px;
    background: #f7f9fd;
    cursor: default;
    transition: background 0.1s ease, box-shadow 0.1s ease;
}

.plan-month-cell--clickable { cursor: pointer; }
.plan-month-cell--outside { opacity: 0.4; }
.plan-month-cell--conflict { background: #fdecef; }
.plan-month-cell-date { font-size: 0.8rem; color: #56688f; }
.plan-month-cell-count {
    display: inline-block;
    margin-top: 0.25rem;
    background: #1f3a84;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 0.05rem 0.4rem;
    cursor: pointer;
}
.plan-month-cell-conflict-marker { position: absolute; top: 4px; right: 6px; color: #c8322b; }

.plan-month-cell--hover-0 { background: #dbe6fb; box-shadow: inset 0 0 0 2px #1f3a84; }
.plan-month-cell--hover-1 { background: #e3dbfb; box-shadow: inset 0 0 0 2px #6a3fc8; }
.plan-month-cell--hover-2 { background: #dbf3e9; box-shadow: inset 0 0 0 2px #1a7a4a; }
.plan-month-cell--hover-3 { background: #fbedd8; box-shadow: inset 0 0 0 2px #b5760f; }
.plan-month-cell--hover-overlap { background: #fdecef; box-shadow: inset 0 0 0 2px #c8322b; }

.plan-month-drilldown { margin-top: 1rem; }
.plan-month-drilldown-title { font-weight: 600; color: #1b2f65; margin-bottom: 0.5rem; }
.plan-row--selected { outline: 2px solid #1b2f65; outline-offset: 1px; }
.plan-row--clickable { cursor: pointer; }

.plan-drill-list { display: flex; flex-direction: column; gap: 0.4rem; }
.plan-drill-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: #ffffff;
    border: 1px solid #eef1f8;
    border-left: 3px solid #c8d3e8;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-drill-row:hover { background: #f7f9fd; }
.plan-drill-row--warn    { border-left-color: #e6a817; }
.plan-drill-row--success { border-left-color: #1a7a4a; }
.plan-drill-row--danger  { border-left-color: #c8322b; }
.plan-drill-row-status {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #56688f;
}
.plan-drill-row--warn    .plan-drill-row-status { color: #b5760f; }
.plan-drill-row--success .plan-drill-row-status { color: #1a7a4a; }
.plan-drill-row--danger  .plan-drill-row-status { color: #c8322b; }
.plan-drill-row-title { font-weight: 600; color: #1b2f65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-drill-row-meta { font-size: 0.85rem; color: #56688f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
    .plan-body { grid-template-columns: 1fr; }
    .plan-side { position: static; }
}

.conv-empty {
    font-size: 0.875rem;
    color: #9aaabf;
    font-style: italic;
    padding: 0.5rem 0;
}

.conv-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 26rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.conv-system {
    align-self: center;
    font-size: 0.8125rem;
    color: #56688f;
    background: #eef3fc;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
}

.conv-bubble-row { display: flex; }
.conv-bubble-row--left { justify-content: flex-start; }
.conv-bubble-row--right { justify-content: flex-end; }

.conv-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.conv-bubble--left {
    background: #fdf6fb;
    border-left: 3px solid #F57EB6;
}
.conv-bubble--right {
    background: #f0f4ff;
    border-right: 3px solid #1b2f65;
}

.conv-bubble-author {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6a8a;
}

.conv-bubble-body {
    font-size: 0.9375rem;
    color: #1b2f65;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.conv-bubble-time {
    font-size: 0.72rem;
    color: #9aaabf;
}

.conv-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.conv-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: #1b2f65;
    background: #fff;
    border: 1px solid #c8d3e8;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    text-decoration: none;
    width: fit-content;
}
.conv-attachment-chip:hover { border-color: #1b2f65; background: #f0f4ff; }
.conv-attachment-size { color: #9aaabf; }

.conv-composer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #dce3f0;
}

.conv-composer-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #c8d3e8;
    font-size: 0.9375rem;
    color: #1b2f65;
    background: #fff;
    resize: vertical;
    min-height: 4.5rem;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.conv-composer-textarea:focus { border-color: #1b2f65; }

.conv-composer-files { display: flex; flex-direction: column; gap: 0.5rem; }

.conv-composer-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.conv-composer-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #1b2f65;
    background: #f6f8fc;
    border: 1px solid #dce3f0;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
}
.conv-composer-file-remove {
    background: none;
    border: none;
    color: #c8322b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.conv-composer-error {
    background: #fdecef;
    border: 1px solid #f0c6cf;
    color: #b6243d;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.6rem 0.9rem;
}

.conv-composer-hint {
    background: #fff8e1;
    border: 1px solid #f0e0a8;
    color: #7a4e00;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.6rem 0.9rem;
}

.conv-composer-actions { display: flex; }

.ab-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ab-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-weight: 600;
    color: #1b2f65;
    font-size: 0.85rem;
}

.ab-date-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ab-week-label {
    font-weight: 600;
    color: #1b2f65;
}
.conv-composer-actions .ap-btn { width: auto; padding: 0.7rem 1.75rem; }
