

html,
body {
	margin: 0;
	padding: 0;
	/* Safety net: a layout bug should clip, not add horizontal page scroll. */
	overflow-x: hidden;
}

body {
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: #1b2f65;
	background: #ffffff;
}

* {
	box-sizing: border-box;
}

.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;
}

.skip-link {
	position: absolute;
	top: -3rem;
	left: 0.5rem;
	z-index: 100;
	background: #1f3a84;
	color: #ffffff;
	padding: 0.6rem 1rem;
	border-radius: 0 0 6px 6px;
	text-decoration: none;
	font-weight: 600;
}

.skip-link:focus {
	top: 0;
}

#nav-progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 0;
	height: 3px;
	background: #1f3a84;
	z-index: 9999;
	opacity: 0;
	transition: width 0s, opacity 0.15s ease;
	pointer-events: none;
}

#nav-progress-bar.is-active {
	width: 70%;
	opacity: 1;
	transition: width 6s cubic-bezier(0.1, 0.7, 0.3, 1), opacity 0.15s ease;
}

#nav-progress-bar.is-done {
	width: 100%;
	opacity: 1;
	transition: width 0.2s ease, opacity 0.2s ease 0.15s;
}

.boot-failure-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 0.7rem 1rem;
	background: #fdecef;
	border-bottom: 1px solid #f3c9cd;
	color: #8f2620;
	font-size: 0.9rem;
	line-height: 1.45;
	text-align: center;
}

.boot-failure-banner[hidden] {
	display: none;
}

.boot-failure-banner kbd {
	padding: 0.05rem 0.35rem;
	background: #ffffff;
	border: 1px solid #f3c9cd;
	border-radius: 3px;
	font-family: inherit;
	font-size: 0.85em;
}

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

.boot-failure-banner-retry:hover {
	background: #8f2620;
	border-color: #8f2620;
}

.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;
}

.utility-bar {
    background: #1f3a84;
    color: #ffffff;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

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

.utility-user {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
}

.utility-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.utility-link:hover {
    opacity: 0.85;
}

.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;
}

.top-nav {
    display: flex;
    gap: 1.4rem;
}

.top-nav a {
    text-decoration: none;
    color: #38518a;
    font-weight: 600;
}

.hero {
    background: linear-gradient(132deg, #1f3a84 0%, #3f66c2 100%);
    color: #ffffff;
    padding: 3.8rem 0;
}

.hero-copy {
    max-width: 42rem;
}

.hero h1 {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.02;
    margin: 0.7rem 0 1rem;
}

.hero h1 em {
    color: #cfe0ff;
    font-style: normal;
}

.hero p {
    margin: 0;
    max-width: 38rem;
    line-height: 1.45;
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.23em;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.82;
}

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

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

.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;
}

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

.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;
}

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

.date-title {
    font-family: "Source Serif 4", Georgia, serif;
    color: #1f3a84;
    font-size: clamp(1.15rem, 3.5vw, 1.85rem);
    font-weight: 700;
    /* No text-transform: capitalize: it would wrongly title-case Norwegian month names mid-string. */
}

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

.quick-btn {
    border: 2px solid #dce3f0;
    background: #ffffff;
    height: 42px;
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 700;
}

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

.date-input {
    margin-left: auto;
    border: 2px solid #b8caec;
    background: #ffffff;
    color: #1f3a84;
    padding: 0 0.8rem;
    height: 42px;
    font-weight: 600;
}

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

.section-head-no-border {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

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

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

.finder-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

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

.finder-meta {
    white-space: nowrap;
    text-align: right;
}

.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 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.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;
}

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

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

.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-mismatch .status-icon {
    background: #98a2b3;
}

.finder-result-mismatch .finder-room-count {
    color: #6a7385;
}

.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-family: "Source Serif 4", Georgia, serif;
    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;
}

.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;
}

.finder-room-description {
    margin: 0.45rem 0 0;
    color: #4d5f78;
    line-height: 1.45;
}

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

.feature-chip {
    border: 1px solid #c9d7f4;
    color: #476195;
    background: #f8fbff;
}

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

.finder-room-count {
    font-family: "Source Serif 4", Georgia, serif;
    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;
}

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

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

.finder-more,
.finder-empty-copy,
.finder-footnote {
    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;
}

.finder-footnote {
    margin: 1rem 0 0;
    padding-top: 0.95rem;
    border-top: 1px solid #dce3f0;
    text-align: center;
    font-size: 0.82rem;
}

.schedule-head {
    margin-bottom: 1.2rem;
}

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

.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) {
    border-color: #1f3a84;
    background: #f8fafd;
}

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

.room-tab-name {
    font-family: "Source Serif 4", Georgia, serif;
    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;
}

.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: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.room-summary-title {
    margin-bottom: 0.35rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    color: #1f3a84;
}

.room-summary p {
    margin: 0;
    max-width: 33rem;
    line-height: 1.5;
}

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

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

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

.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: dashed;
    border-color: #80c49a;
    background: #f0faf3;
    color: #217745;
    cursor: pointer;
}

.slot-past {
    border-style: dashed;
    border-color: #d1d6df;
    background: #f3f4f7;
    color: #636d80;
    cursor: not-allowed;
}

.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 {
    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;
}

.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;
}

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

.booking-placeholder {
    text-align: center;
    padding: 2.6rem 1.5rem;
    max-width: 34rem;
    margin: 1rem auto;
}
.booking-placeholder h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    color: #1b2f65;
}
.booking-placeholder p {
    margin: 0 auto 0.6rem auto;
    max-width: 30rem;
    color: #56688f;
    line-height: 1.55;
}
.booking-placeholder-actions {
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.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;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.footer-logo {
    background: #ffffff;
    color: #1f3a84;
    font-weight: 800;
    letter-spacing: 0.2em;
    padding: 0.5rem 0.65rem;
}

.footer-right {
    text-transform: uppercase;
    letter-spacing: 0.09em;
    opacity: 0.84;
    font-size: 0.75rem;
}

@media (max-width: 900px) {
    .finder-filters,
    .room-tab-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;
    }
}

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

    .top-nav {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

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

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

    .quick-row {
        flex-direction: column;
    }

    .date-input {
        margin-left: 0;
        width: 100%;
    }

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

    .slot {
        flex-wrap: wrap;
    }

    .slot-time {
        width: auto;
    }
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 49, 0.56);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 10;
}

.modal {
    width: min(540px, 100%);
    background: #ffffff;
    border: 2px solid #b8caec;
    padding: 1.1rem;
}

.modal h3 {
    margin: 0.3rem 0 0.2rem;
    font-family: "Source Serif 4", Georgia, serif;
    color: #1f3a84;
    font-size: 2rem;
}

.modal p {
    margin-top: 0;
    color: #3d4f74;
}

.modal label {
    display: block;
    margin-top: 0.72rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #4d5f78;
    font-weight: 700;
}

.modal input {
    width: 100%;
    border: 2px solid #dce3f0;
    padding: 0.75rem;
    box-sizing: border-box;
    font-size: 1rem;
}

.modal input.readonly {
    background: #eef3fc;
    color: #2f487e;
}

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

.duration {
    border: 2px solid #dce3f0;
    background: #ffffff;
    font-weight: 700;
    padding: 0.72rem 0.35rem;
}

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

.duration:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-style: dashed;
}

.end-time {
    margin-top: 0.55rem;
    color: #5f7195;
}

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

.modal-actions button {
    flex: 1;
    border: 2px solid transparent;
    padding: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.modal-actions .secondary {
    border-color: #c8d6ee;
    background: #ffffff;
    color: #1f3a84;
}

.modal-actions .primary {
    background: #1f3a84;
    color: #ffffff;
}

.modal-actions .danger {
    background: #b63737;
    color: #ffffff;
}

.modal-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .utility-help,
    .top-nav {
        display: none;
    }

    /* Collapse the whole header, not just .brand-text: it is the header's only content. */
    .main-header {
        display: none;
    }

    .hero {
        padding: 2.6rem 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .quick-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .date-input {
        margin-left: 0;
        grid-column: span 2;
    }

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

    .slot {
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .mine-tag {
        display: none;
    }
}

.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-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;
}

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

.chip-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: dashed !important;
}

.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-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;
    cursor: pointer;
    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: 640px) {
    .dialog-panel {
        padding: 1.25rem;
    }

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

    .dialog-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}


.app-nav {
    background: #1f3a84;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}
/* Grid, not flex: flex `order` can't move only the links to row two when they wrap. */
.app-nav-inner {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand links actions";
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    padding: 0.65rem 0;
}
.app-nav-brand {
    grid-area: brand;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
    white-space: nowrap;
}
/* The default focus ring is invisible on this navy bar; matches .slot:focus-visible in room-booking.css. */
.app-nav-brand:focus-visible,
.app-nav-link:focus-visible,
.app-nav-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #1f3a84;
}
.app-nav-links {
    grid-area: links;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}
.app-nav-links > li { flex: 0 0 auto; }
.app-nav-link {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
}
.app-nav-link:hover:not(.active) { background: rgba(255,255,255,0.1); color: #ffffff; }
.app-nav-link.active { background: rgba(255,255,255,0.18); color: #ffffff; }
.app-nav-link:active { transform: scale(0.96); }
.app-nav-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: end;
}
.app-nav-user { font-size: 0.85rem; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; }
.app-nav-btn {
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}
.app-nav-btn:hover { background: rgba(255,255,255,0.1); }
.app-nav-btn.primary { background: #ffffff; color: #1f3a84; border-color: #ffffff; }
.app-nav-btn.primary:hover { background: #f0f4ff; }

/* Native <details> disclosure, so it works on the static-SSR nav. Nested in .app-nav-actions to stay rightmost. */
.app-nav-hamburger { display: none; position: relative; }

.app-nav-hamburger-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
}
.app-nav-hamburger-toggle::-webkit-details-marker { display: none; }
.app-nav-hamburger-toggle:hover { background: rgba(255,255,255,0.1); }
.app-nav-hamburger-toggle:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }

.app-nav-hamburger-icon,
.app-nav-hamburger-icon::before,
.app-nav-hamburger-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.app-nav-hamburger-icon { position: relative; }
.app-nav-hamburger-icon::before,
.app-nav-hamburger-icon::after { content: ""; position: absolute; left: 0; }
.app-nav-hamburger-icon::before { top: -6px; }
.app-nav-hamburger-icon::after { top: 6px; }

.app-nav-hamburger[open] .app-nav-hamburger-icon { background: transparent; }
.app-nav-hamburger[open] .app-nav-hamburger-icon::before { top: 0; transform: rotate(45deg); }
.app-nav-hamburger[open] .app-nav-hamburger-icon::after { top: 0; transform: rotate(-45deg); }

.app-nav-hamburger-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    min-width: 12rem;
    background: #1f3a84;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 26, 64, 0.35);
}
.app-nav-hamburger-panel .app-nav-link { display: block; }
.app-nav-hamburger-panel li + li { margin-top: 0.15rem; }

/* 580-1050px: brand + actions on row one, links alone on row two. Kept separate from the hamburger breakpoint. */
@media (max-width: 1050px) {
    .app-nav-inner {
        grid-template-columns: auto auto;
        grid-template-areas:
            "brand actions"
            "links links";
        column-gap: 0.75rem;
        row-gap: 0.5rem;
        padding: 0.55rem 0;
    }

    .app-nav-brand { font-size: 0.95rem; }

    .app-nav-actions { gap: 0.5rem; }

    .app-nav-links { gap: 0.15rem; }
    .app-nav-link { padding: 0.35rem 0.7rem; font-size: 0.9rem; }

    .app-nav-user { max-width: 8rem; }
}

@media (max-width: 580px) {
    .app-nav-inner {
        grid-template-areas: "brand actions";
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .app-nav-links { display: none; }
    .app-nav-hamburger { display: block; }

    .app-nav-btn { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

    /* minmax(0, 1fr) + truncation: otherwise the brand pushes .app-nav-actions off-screen with no scrollbar. */
    .app-nav-brand {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.85rem;
    }

    .app-nav-user { max-width: 6rem; }
}

.admin-shell {
    min-height: calc(100vh - 60px);
    background: #f6f8fc;
    color: #1b2f65;
}
.admin-container {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3rem 0;
}
.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.admin-header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; }
.admin-header p { margin: 0.25rem 0 0 0; color: #56688f; }
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
}
.admin-card {
    display: block;
    background: #ffffff;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    color: #1b2f65;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.12s ease;
}
.admin-card:hover { border-color: #1f3a84; transform: translateY(-1px); }
.admin-card-title { font-size: 1rem; font-weight: 600; }
.admin-card-desc { font-size: 0.82rem; color: #56688f; margin-top: 0.3rem; }
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dce3f0;
}
.admin-tab {
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    border-radius: 6px;
    color: #1b2f65;
    font-size: 0.88rem;
    font-weight: 500;
}
.admin-tab:hover { background: #e7eef9; }
.admin-tab.active { background: #1f3a84; color: #ffffff; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.92rem;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #eef2f8;
}
.admin-table th { background: #f1f4fa; color: #56688f; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.editing { background: #fff8e8; }
.admin-table tr.admin-edit-row > td { padding: 0; background: #fff8e8; }
.admin-table tr.admin-edit-row .admin-form { margin: 0; border: 0; border-radius: 0; }
.asset-tree-edit { list-style: none; background: #fff8e8; }
.asset-tree-edit .admin-form { margin: 0; }
.admin-row-actions { display: flex; gap: 0.4rem; }
.admin-btn {
    border: 1px solid #c2cce0;
    background: #ffffff;
    color: #1b2f65;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
}
.admin-btn:hover { background: #eef2f8; }
.admin-btn.primary { background: #1f3a84; color: #ffffff; border-color: #1f3a84; }
.admin-btn.primary:hover { background: #14276b; }
.admin-btn.danger { color: #b6243d; border-color: #f0c6cf; }
.admin-btn.danger:hover { background: #fdecef; }
.admin-btn:disabled { opacity: 0.75; cursor: default; }
.admin-btn:has(.admin-spinner) { display: inline-flex; align-items: center; gap: 0.4rem; }
.admin-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .admin-spinner { animation-duration: 1.4s; }
}
.admin-form {
    background: #ffffff;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}
.admin-form h3 { margin: 0 0 0.75rem 0; font-size: 1rem; }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; }
.admin-field { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-field-full-width { grid-column: 1 / -1; }
.admin-field label { font-size: 0.78rem; color: #56688f; font-weight: 600; }
.admin-field input, .admin-field textarea, .admin-field select {
    border: 1px solid #c2cce0;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    font-family: inherit;
}
.admin-field textarea { min-height: 60px; resize: vertical; }
.admin-field .validation-message { color: #b6243d; font-size: 0.78rem; }
.admin-validation-summary { margin-top: 0.75rem; color: #b6243d; font-size: 0.82rem; }
.admin-validation-summary ul { margin: 0.25rem 0 0; padding-left: 1rem; }
.admin-form-actions { margin-top: 0.85rem; display: flex; gap: 0.5rem; }
.admin-empty { text-align: center; color: #56688f; padding: 2rem; background: #ffffff; border: 1px dashed #c2cce0; border-radius: 10px; }
.admin-toast {
    margin: 0.75rem 0;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
}
.admin-toast.info { background: #e7f0ff; color: #14276b; }
.admin-toast.error { background: #fdecef; color: #b6243d; }
.admin-muted { color: #56688f; font-size: 0.82rem; }
.admin-catalog-tree { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
.admin-catalog-group { border: 1px solid #dde3ef; border-radius: 8px; padding: 0.65rem 0.85rem; }
.admin-catalog-group-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.admin-catalog-group-header h4 { margin: 0; font-size: 0.9rem; }
.admin-catalog-items { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.25rem 0.75rem; }
.admin-catalog-item label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.admin-catalog-items-scroll { max-height: 280px; overflow-y: auto; }

.cancelled-confirmation {
    max-width: 520px;
    padding: 0;
    overflow: hidden;
}
.cancelled-header {
    background: #1b2f65;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cancelled-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cancelled-icon svg {
    display: block;
}
.cancelled-header-text {
    min-width: 0;
}
.cancelled-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.75);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.3rem;
    border-radius: 2px;
}
.cancelled-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    outline: none;
}
.cancelled-body {
    padding: 1.5rem 2rem;
}
.cancelled-sub {
    font-size: 0.875rem;
    color: #56688f;
    margin: 0 0 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #dce3f0;
}
.cancelled-details {
    margin: 0 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cancelled-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f3f9;
}
.cancelled-row:first-child {
    border-top: 1px solid #f0f3f9;
}
.cancelled-row dt {
    flex: 0 0 6rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9aaabf;
}
.cancelled-row dd {
    flex: 1;
    font-size: 0.9375rem;
    color: #1b2f65;
    font-weight: 500;
    margin: 0;
    min-width: 0;
}
.cancelled-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
@media (max-width: 560px) {
    .cancelled-header { padding: 1.25rem 1.25rem; }
    .cancelled-body   { padding: 1.25rem 1.25rem; }
}

.eier-step-card {
    background: #ffffff;
    border: 1px solid #dce4f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.eier-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.eier-step-header h2 { margin: 0; font-size: 1.1rem; color: #1b2a4a; flex: 1; }
.eier-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #1f3a84;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}
.eier-field { margin-bottom: 1rem; }
.eier-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}
.eier-label.required::after { content: " *"; color: #b6243d; }
.eier-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #c2cce0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1b2a4a;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.eier-input:focus { border-color: #1f3a84; outline: none; }
.eier-input:disabled { background: #f5f7fc; color: #8899bb; }
.eier-textarea { min-height: 5rem; resize: vertical; }
.eier-input-sm { max-width: 10rem; }
.eier-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #c2cce0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1b2a4a;
    background: #ffffff;
    box-sizing: border-box;
}
.eier-select:disabled { background: #f5f7fc; color: #8899bb; }
.eier-type-row { display: flex; gap: 0.5rem; align-items: center; }
.eier-type-row .eier-select { flex: 1; }
.eier-inline-create { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.eier-inline-create .eier-input { flex: 1; min-width: 10rem; }
.eier-field-hint { font-size: 0.78rem; color: #56688f; margin: 0.35rem 0 0; }
.eier-field-error { font-size: 0.82rem; color: #b6243d; margin: 0.35rem 0 0; }

.eier-image-upload { display: flex; flex-direction: column; gap: 0.5rem; }
.eier-image-preview { position: relative; display: inline-block; max-width: 220px; }
.eier-image-preview img { display: block; max-width: 100%; border-radius: 8px; border: 1px solid #dce4f0; }
.eier-image-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eier-image-btn {
    display: inline-block;
    cursor: pointer;
    padding: 0.45rem 1rem;
    border: 1px dashed #1f3a84;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1f3a84;
    background: #f0f4ff;
    transition: background 0.15s;
    user-select: none;
}
.eier-image-btn:hover { background: #e4ecff; }
.eier-image-btn.disabled { opacity: 0.55; cursor: not-allowed; }

.eier-tag-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid #c2cce0;
    border-radius: 6px;
    background: #fff;
    cursor: text;
    min-height: 2.5rem;
    transition: border-color 0.15s;
}
.eier-tag-input:focus-within { border-color: #1f3a84; box-shadow: 0 0 0 2px rgba(31,58,132,0.12); }
.eier-tag-input.disabled { background: #f5f7fc; cursor: not-allowed; }
.eier-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    background: #e9effd;
    color: #1f3a84;
    font-size: 0.83rem;
    white-space: nowrap;
}
.eier-tag-remove {
    background: none;
    border: none;
    color: #1f3a84;
    cursor: pointer;
    padding: 0;
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0.7;
}
.eier-tag-remove:hover { opacity: 1; }
.eier-tag-text {
    flex: 1;
    min-width: 8rem;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: #374151;
    padding: 0.1rem 0;
}
.eier-tag-text:disabled { cursor: not-allowed; }

.eier-approver-section {
    border: 1px solid #e4b84a;
    background: #fffbf0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.eier-approver-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a5c00;
    background: #fdefc8;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.75rem;
}

.eier-editor-card {
    background: #ffffff;
    border: 1px solid #dce4f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.eier-editor-title { margin: 0 0 1.25rem; font-size: 1.05rem; color: #1b2a4a; }
.eier-editor-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

.eier-room-list { display: flex; flex-direction: column; gap: 0.75rem; }
.eier-room-card {
    background: #f8fafc;
    border: 1px solid #dce4f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.15s;
}
.eier-room-card.is-editing { border-color: #1f3a84; background: #f0f4ff; }
.eier-room-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.eier-room-name { font-weight: 600; color: #1b2a4a; }
.eier-room-extid {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.78rem;
    color: #56688f;
    background: #eef1f8;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
}
.eier-room-desc { margin: 0.4rem 0 0; font-size: 0.875rem; color: #56688f; }

.eier-room-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }
.eier-room-chip {
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    border: 1px solid #c2cce0;
    background: #f5f7fc;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 7rem;
}
.eier-room-chip:hover { border-color: #1f3a84; background: #e9effd; }
.eier-room-chip.active { background: #1f3a84; color: #fff; border-color: #1f3a84; }
.eier-room-chip-name { font-weight: 600; white-space: nowrap; }
.eier-room-chip-type { font-size: 0.78rem; opacity: 0.72; white-space: nowrap; }
.eier-room-chip.active .eier-room-chip-type { opacity: 0.85; }

.eier-fields-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem 1.25rem;
    align-items: start;
    margin-bottom: 1rem;
}
.eier-field-inline { display: flex; flex-direction: column; gap: 0.3rem; }

.eier-image-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.eier-image-preview-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 8px; display: block; }
.eier-image-preview-btn:hover .eier-image-thumb { opacity: 0.85; box-shadow: 0 2px 8px rgba(31,58,132,0.18); }
.eier-image-thumb { width: 180px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; display: block; }

.eier-new-type-wrap { position: relative; }
.eier-new-type-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #c2cce0;
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 260px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eier-reuse-toggle { display: flex; gap: 1rem; margin: 0.5rem 0; flex-wrap: wrap; }
.eier-reuse-option { display: flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; color: #1b2a4a; cursor: pointer; }
.eier-reuse-option input[type="radio"] { margin: 0; }

.eier-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}
@media (max-width: 700px) {
    .eier-week-grid { grid-template-columns: repeat(2, 1fr); }
}
.eier-day-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.eier-day-header {
    width: 100%;
    padding: 0.4rem 0.2rem;
    border-radius: 6px;
    border: 1px solid #c2cce0;
    background: #f5f7fc;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.12s;
}
.eier-day-header.active { background: #1f3a84; color: #fff; border-color: #1f3a84; }
.eier-day-header:hover:not(:disabled) { border-color: #1f3a84; }
.eier-day-blocks { display: flex; flex-direction: column; gap: 0.25rem; }
.eier-time-block {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: #f0f4ff;
    border-radius: 5px;
    padding: 0.25rem 0.3rem;
}
.eier-time-sel {
    font-size: 0.72rem;
    border: none;
    background: transparent;
    padding: 0;
    min-width: 0;
    flex: 1;
    cursor: pointer;
}
.eier-time-sep { font-size: 0.7rem; color: #6b7280; }
.eier-block-remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.65rem;
    padding: 0 0.1rem;
    line-height: 1;
}
.eier-block-remove:hover { color: #dc2626; }
.eier-add-block {
    font-size: 0.72rem;
    color: #1f3a84;
    background: none;
    border: 1px dashed #c2cce0;
    border-radius: 4px;
    padding: 0.2rem;
    cursor: pointer;
    text-align: center;
    width: 100%;
}
.eier-add-block:hover { background: #e9effd; border-color: #1f3a84; }

.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding-top: 0.5rem;
}

.app-version {
    padding: 0 1rem 1rem;
    text-align: center;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: #5f6b85;
    user-select: text;
}

.view-mode-picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.view-mode-picker-label {
    font-size: 0.75rem;
    color: #9aa8c2;
}

.view-mode-picker-select {
    appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.5L6 6l4.5-4.5' stroke='%236a7d9f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.85'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
    background-size: 0.6rem;
    color: #4d5f78;
    border: 1px solid #dce3f0;
    border-radius: 6px;
    padding: 0.3rem 1.5rem 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.view-mode-picker-select:hover { border-color: #b8caec; color: #1f3a84; }
.view-mode-picker-select:focus-visible { outline: 2px solid #1f3a84; outline-offset: 2px; }
.view-mode-picker-select option { color: #1b2f65; }

/* Route visibility matrix: a cell's own rule is solid, an inherited answer is muted. */
.rv-matrix-scroll { overflow-x: auto; }
.rv-matrix td { text-align: center; }
.rv-cell {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.rv-cell.allow { background: #e3f4e7; color: #1d6b32; border-color: #bfe3c8; }
.rv-cell.deny { background: #fae4e4; color: #8d2525; border-color: #efc5c5; }
.rv-cell.inherited { background: transparent; font-weight: 400; opacity: 0.7; }
.rv-cell.inherited.allow { color: #3f7a4e; border-style: dashed; border-color: #bfe3c8; }
.rv-cell.inherited.deny { color: #9c5252; border-style: dashed; border-color: #efc5c5; }
.rv-cell:disabled { cursor: progress; }
.admin-fieldset { border: 1px solid #dfe4ef; border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
.admin-fieldset legend { font-size: 0.78rem; color: #56688f; font-weight: 600; padding: 0 0.3rem; }
.admin-fieldset label { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 1rem; }
