/**
 * Room Occupancy & Housekeeping Manager v3 Stylesheet
 * Light & Dark themes, Card Grid & Compact Table views, Bulk bar, Operations strip,
 * Active Sessions, Activity Audit Log, and Print-Friendly Housekeeping Sheet.
 */

.rom-standalone-body {
	margin: 0;
	padding: 0;
	background: #f1f5f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #0f172a;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.rom-standalone-body.rom3-dark-page {
	background: #0b1120;
	color: #f1f5f9;
}

.rom-standalone-wrapper {
	min-height: 100vh;
}

.rom-app {
	--rom-bg: #f8fafc;
	--rom-surface: #ffffff;
	--rom-surface-muted: #f1f5f9;
	--rom-border: #e2e8f0;
	--rom-border-strong: #cbd5e1;
	--rom-text: #0f172a;
	--rom-text-muted: #475569;
	--rom-text-subtle: #64748b;
	--rom-primary: #2563eb;
	--rom-primary-hover: #1d4ed8;
	--rom-green: #16a34a;
	--rom-green-bg: #dcfce7;
	--rom-green-border: #86efac;
	--rom-green-text: #166534;
	--rom-amber: #d97706;
	--rom-amber-bg: #fef3c7;
	--rom-amber-text: #92400e;
	--rom-red: #dc2626;
	--rom-red-bg: #fee2e2;
	--rom-red-border: #fecaca;
	--rom-red-text: #991b1b;
	--rom-gray: #64748b;
	--rom-gray-bg: #f1f5f9;
	--rom-gray-text: #334155;
	--rom-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
	--rom-radius: 12px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--rom-text);
	max-width: 1420px;
	margin: 0 auto;
	padding: 20px 16px 48px;
	line-height: 1.45;
	box-sizing: border-box;
}

.rom-app[data-rom-theme="dark"] {
	--rom-bg: #0f172a;
	--rom-surface: #1e293b;
	--rom-surface-muted: #0f172a;
	--rom-border: #334155;
	--rom-border-strong: #475569;
	--rom-text: #f1f5f9;
	--rom-text-muted: #cbd5e1;
	--rom-text-subtle: #94a3b8;
	--rom-primary: #3b82f6;
	--rom-primary-hover: #60a5fa;
	--rom-green: #22c55e;
	--rom-green-bg: rgba(22, 163, 74, 0.2);
	--rom-green-border: #15803d;
	--rom-green-text: #86efac;
	--rom-amber: #f59e0b;
	--rom-amber-bg: rgba(217, 119, 6, 0.2);
	--rom-amber-text: #fcd34d;
	--rom-red: #ef4444;
	--rom-red-bg: rgba(220, 38, 38, 0.22);
	--rom-red-border: #b91c1c;
	--rom-red-text: #fca5a5;
	--rom-gray: #94a3b8;
	--rom-gray-bg: #334155;
	--rom-gray-text: #e2e8f0;
	--rom-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.rom-app *,
.rom-app *::before,
.rom-app *::after {
	box-sizing: border-box;
}

/* Auth & Setup Gates */
.rom-auth-gate {
	padding: 32px 16px;
}

.rom-login-card {
	max-width: 460px;
	margin: 28px auto;
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: 16px;
	padding: 30px 26px;
	text-align: center;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.rom-setup-card {
	max-width: 500px;
}

.rom-login-lang-row {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.rom-login-badge {
	display: inline-block;
	background: rgba(37, 99, 235, 0.12);
	color: var(--rom-primary);
	border: 1px solid rgba(37, 99, 235, 0.3);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	margin-bottom: 12px;
}

.rom-login-title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: var(--rom-text);
}

.rom-login-desc {
	margin: 0 0 20px;
	color: var(--rom-text-muted);
	font-size: 14px;
}

.rom-login-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.rom-login-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-align: left;
}

.rom-login-error {
	background: var(--rom-red-bg);
	color: var(--rom-red-text);
	border: 1px solid var(--rom-red-border);
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 500;
}

.rom-login-error[hidden] {
	display: none;
}

.rom-password-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.rom-password-wrap input {
	padding-right: 44px;
}

.rom-password-toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 7px;
	background: transparent;
	color: var(--rom-text-muted);
	cursor: pointer;
}

.rom-password-toggle:hover,
.rom-password-toggle:focus-visible {
	background: var(--rom-surface-muted);
	color: var(--rom-text);
	outline: none;
}

.rom-remember-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--rom-text);
	cursor: pointer;
	align-self: flex-start;
}

.rom-remember-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--rom-primary);
}

.rom-login-submit {
	width: 100%;
	min-height: 42px;
	font-size: 15px;
}

/* Language Picker & Topbar */
.rom-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.rom-brand-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.rom-title {
	margin: 0;
	font-size: 23px;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: var(--rom-text);
}

.rom-subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--rom-text-subtle);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
}

.rom-sep {
	margin: 0 6px;
}

.rom-link-muted {
	background: transparent;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--rom-text-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.rom-link-muted:hover {
	color: var(--rom-primary);
}

.rom-topbar-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.rom-lang-picker {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--rom-surface);
	border: 1px solid var(--rom-border-strong);
	border-radius: 9px;
	padding: 0 10px;
	min-height: 36px;
}

.rom-lang-select {
	appearance: auto;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--rom-text);
	padding: 6px 2px;
	cursor: pointer;
}

.rom-lang-select option {
	background: var(--rom-surface);
	color: var(--rom-text);
}

.rom-lang-select:focus {
	outline: none;
}

.rom-sync-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--rom-green-bg);
	color: var(--rom-green-text);
}

.rom-sync-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--rom-green);
}

.rom-sync-pill[data-state="syncing"] {
	background: rgba(37, 99, 235, 0.14);
	color: var(--rom-primary);
}

.rom-sync-pill[data-state="syncing"] .rom-sync-dot {
	background: var(--rom-primary);
}

.rom-sync-pill[data-state="paused"] {
	background: var(--rom-amber-bg);
	color: var(--rom-amber-text);
}

.rom-sync-pill[data-state="paused"] .rom-sync-dot {
	background: var(--rom-amber);
}

.rom-sync-pill[data-state="error"] {
	background: var(--rom-red-bg);
	color: var(--rom-red-text);
}

.rom-sync-pill[data-state="error"] .rom-sync-dot {
	background: var(--rom-red);
}

.rom-sync-retry-btn {
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 999px;
	cursor: pointer;
	margin-left: 2px;
}

.rom-sync-retry-btn[hidden] {
	display: none;
}

/* Shift Announcement Banner */
.rom-announcement-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-left: 4px solid var(--rom-primary);
	border-radius: var(--rom-radius);
	padding: 10px 14px;
	margin-bottom: 14px;
	box-shadow: var(--rom-shadow);
}

.rom-announcement-bar[hidden] {
	display: none;
}

.rom-announcement-content {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	flex: 1 1 300px;
}

.rom-announcement-badge {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.12);
	color: var(--rom-primary);
}

.rom-announcement-text {
	font-size: 13px;
	font-weight: 500;
	color: var(--rom-text);
}

.rom-announcement-meta {
	font-size: 12px;
	color: var(--rom-text-subtle);
}

/* Summary KPIs */
.rom-summary-bar {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

.rom-stat-card {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	padding: 12px 14px;
	box-shadow: var(--rom-shadow);
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rom-stat-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rom-text-subtle);
}

.rom-stat-value {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--rom-text);
}

.rom-stat-sub {
	font-size: 12px;
	color: var(--rom-text-subtle);
}

.rom-stat-free .rom-stat-value {
	color: var(--rom-green);
}

.rom-stat-occupied .rom-stat-value {
	color: var(--rom-red);
}

.rom-stat-attention.has-pending {
	background: var(--rom-amber-bg);
	border-color: var(--rom-amber);
}

.rom-stat-attention.has-pending .rom-stat-value {
	color: var(--rom-amber-text);
}

/* Daily Operations Strip */
.rom-ops-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.rom-ops-pill {
	appearance: none;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	border-radius: 999px;
	padding: 5px 12px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
	transition: all 0.14s ease;
}

.rom-ops-pill:hover {
	border-color: var(--rom-primary);
	color: var(--rom-text);
}

.rom-ops-pill.is-active {
	background: var(--rom-primary);
	border-color: var(--rom-primary);
	color: #ffffff;
}

.rom-ops-pill.rom-ops-overdue.has-count:not(.is-active) {
	background: var(--rom-red-bg);
	border-color: var(--rom-red-border);
	color: var(--rom-red-text);
}

/* Form Fields & Buttons */
.rom-add-panel {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	padding: 14px;
	margin-bottom: 14px;
	box-shadow: var(--rom-shadow);
}

.rom-add-form-v2 {
	display: grid;
	grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(90px, 0.7fr) minmax(160px, 1.4fr) auto;
	gap: 10px;
	align-items: end;
}

.rom-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.rom-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--rom-text-muted);
}

.rom-field input,
.rom-field textarea,
.rom-search-input,
.rom-select,
.rom-notes-input {
	width: 100%;
	font-family: inherit;
	font-size: 14px;
	color: var(--rom-text);
	background: var(--rom-surface);
	border: 1px solid var(--rom-border-strong);
	border-radius: 9px;
	padding: 8px 11px;
	min-height: 38px;
}

.rom-field input:focus,
.rom-field textarea:focus,
.rom-search-input:focus,
.rom-select:focus,
.rom-notes-input:focus {
	outline: none;
	border-color: var(--rom-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.rom-field-help {
	font-size: 12px;
	color: var(--rom-text-subtle);
	margin: 0;
}

.rom-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 9px;
	padding: 8px 14px;
	min-height: 38px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	transition: background-color 0.14s ease, border-color 0.14s ease;
}

.rom-btn-sm {
	min-height: 32px;
	padding: 5px 10px;
	font-size: 12px;
}

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

.rom-btn-primary {
	background: var(--rom-primary);
	color: #ffffff;
}

.rom-btn-primary:hover:not(:disabled) {
	background: var(--rom-primary-hover);
}

.rom-btn-secondary {
	background: var(--rom-surface);
	border-color: var(--rom-border-strong);
	color: var(--rom-text);
}

.rom-btn-secondary:hover:not(:disabled) {
	background: var(--rom-surface-muted);
}

.rom-btn-danger-ghost {
	background: transparent;
	border-color: var(--rom-red-border);
	color: var(--rom-red-text);
	min-height: 32px;
	padding: 5px 10px;
	font-size: 12px;
}

.rom-btn-danger-ghost:hover:not(:disabled) {
	background: var(--rom-red-bg);
}

.rom-btn-danger-solid {
	background: var(--rom-red);
	color: #ffffff;
	min-height: 32px;
	padding: 5px 11px;
	font-size: 12px;
}

/* Toolbar, Floors, Sorting & Bulk Bar */
.rom-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.rom-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.rom-filter-pill {
	appearance: none;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	border-radius: 999px;
	padding: 6px 12px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
}

.rom-filter-pill.is-active {
	background: var(--rom-primary);
	border-color: var(--rom-primary);
	color: #ffffff;
}

.rom-toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	flex: 1 1 280px;
	justify-content: flex-end;
}

.rom-sort-select {
	width: auto;
	min-width: 155px;
	min-height: 36px;
	font-size: 13px;
	cursor: pointer;
}

.rom-search-wrap {
	flex: 1 1 200px;
	max-width: 300px;
}

.rom-floor-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.rom-floor-pills[hidden] {
	display: none;
}

.rom-floor-pill {
	appearance: none;
	border: 1px dashed var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	border-radius: 8px;
	padding: 4px 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.rom-floor-pill.is-active {
	background: var(--rom-primary);
	border-style: solid;
	border-color: var(--rom-primary);
	color: #ffffff;
}

.rom-bulk-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: rgba(37, 99, 235, 0.1);
	border: 1px solid var(--rom-primary);
	border-radius: var(--rom-radius);
	padding: 10px 14px;
	margin-bottom: 14px;
}

.rom-bulk-bar[hidden] {
	display: none;
}

.rom-bulk-left,
.rom-bulk-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.rom-toast-region {
	min-height: 0;
	margin-bottom: 8px;
}

.rom-toast {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #0f172a;
	color: #ffffff;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
}

.rom-toast-undo-btn {
	border: 1px solid rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 7px;
	cursor: pointer;
	flex-shrink: 0;
}

.rom-toast-undo-btn:hover {
	background: rgba(255, 255, 255, 0.24);
}

.rom-toast.is-error {
	background: var(--rom-red);
}

.rom-toast.is-success {
	background: #15803d;
}

/* Rooms Card Grid */
.rom-rooms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 14px;
}

.rom-rooms-grid.is-table-view {
	display: block;
}

.rom-room-card {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-top: 4px solid var(--rom-gray);
	border-radius: var(--rom-radius);
	padding: 15px;
	box-shadow: var(--rom-shadow);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rom-room-card[data-status="available"] {
	border-top-color: var(--rom-green);
}

.rom-room-card[data-status="partial"] {
	border-top-color: var(--rom-amber);
}

.rom-room-card[data-status="occupied"] {
	border-top-color: var(--rom-red);
}

.rom-room-card[data-status="maintenance"] {
	border-top-color: var(--rom-gray);
}

.rom-room-card.is-unlocked {
	border-color: var(--rom-primary);
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.rom-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.rom-card-title-left {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.rom-room-select-cb {
	width: 17px;
	height: 17px;
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: var(--rom-primary);
	cursor: pointer;
}

.rom-room-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--rom-text);
	overflow-wrap: anywhere;
}

.rom-floor-chip {
	display: inline-block;
	margin-top: 3px;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 6px;
	background: var(--rom-surface-muted);
	color: var(--rom-text-muted);
	border: 1px solid var(--rom-border);
}

.rom-card-header-actions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
	flex-shrink: 0;
}

.rom-lock-btn {
	appearance: none;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	border-radius: 7px;
	padding: 4px 9px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	touch-action: manipulation;
}

.rom-lock-btn.is-unlocked {
	background: rgba(37, 99, 235, 0.14);
	border-color: var(--rom-primary);
	color: var(--rom-primary);
}

.rom-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.rom-status-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.rom-status-badge.is-available {
	background: var(--rom-green-bg);
	color: var(--rom-green-text);
}
.rom-status-badge.is-available::before { background: var(--rom-green); }

.rom-status-badge.is-partial {
	background: var(--rom-amber-bg);
	color: var(--rom-amber-text);
}
.rom-status-badge.is-partial::before { background: var(--rom-amber); }

.rom-status-badge.is-occupied {
	background: var(--rom-red-bg);
	color: var(--rom-red-text);
}
.rom-status-badge.is-occupied::before { background: var(--rom-red); }

.rom-status-badge.is-maintenance {
	background: var(--rom-gray-bg);
	color: var(--rom-gray-text);
}
.rom-status-badge.is-maintenance::before { background: var(--rom-gray); }

.rom-inline-meta-edit {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.rom-inline-meta-edit[hidden] {
	display: none;
}

.rom-inline-mini-field label {
	font-size: 11px;
}

.rom-inline-mini-field input {
	min-height: 32px;
	padding: 5px 8px;
	font-size: 13px;
}

.rom-inline-meta-actions {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	flex-wrap: wrap;
}

.rom-btn-xs {
	padding: 4px 8px;
	min-height: 28px;
	font-size: 11px;
	border-radius: 7px;
}

/* Bed Visual & Steppers */
.rom-bed-visual {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.rom-bed-visual-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--rom-text-subtle);
	font-weight: 500;
}

.rom-bed-pips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.rom-bed-pip {
	height: 8px;
	flex: 1 1 16px;
	max-width: 34px;
	border-radius: 999px;
	background: var(--rom-border);
}

.rom-bed-pip.is-filled { background: var(--rom-primary); }
.rom-room-card[data-status="occupied"] .rom-bed-pip.is-filled { background: var(--rom-red); }
.rom-room-card[data-status="partial"] .rom-bed-pip.is-filled { background: var(--rom-amber); }
.rom-room-card[data-status="maintenance"] .rom-bed-pip.is-filled { background: var(--rom-gray); }

.rom-bed-progress-track {
	width: 100%;
	height: 8px;
	border-radius: 999px;
	background: var(--rom-border);
	overflow: hidden;
}

.rom-bed-progress-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--rom-primary);
}

.rom-steppers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.rom-stepper-box {
	background: var(--rom-bg);
	border: 1px solid var(--rom-border);
	border-radius: 10px;
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rom-stepper-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rom-text-subtle);
}

.rom-stepper-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.rom-step-btn {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text);
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	touch-action: manipulation;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rom-step-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.rom-step-value {
	font-size: 17px;
	font-weight: 800;
	min-width: 24px;
	text-align: center;
}

/* Dates & Counters */
.rom-card-dates-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rom-card-dates {
	display: flex;
	align-items: stretch;
	gap: 6px;
}

.rom-date-trigger {
	flex: 1 1 0;
	min-width: 0;
	appearance: none;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text);
	border-radius: 9px;
	padding: 6px 10px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	cursor: pointer;
	touch-action: manipulation;
	text-align: left;
}

.rom-date-trigger.has-value {
	border-color: var(--rom-primary);
}

.rom-date-trigger-k {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--rom-text-subtle);
}

.rom-date-trigger-v {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.rom-date-clear-btn {
	flex: 0 0 34px;
	min-height: 36px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	border-radius: 9px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.rom-date-clear-btn[hidden] {
	display: none;
}

.rom-date-trigger:disabled,
.rom-date-clear-btn:disabled,
.rom-select:disabled,
.rom-btn-danger-ghost:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.rom-days-counter {
	padding: 6px 10px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid var(--rom-border);
	background: var(--rom-bg);
	color: var(--rom-text-muted);
}

.rom-days-counter[hidden] { display: none; }
.rom-days-counter.is-upcoming { background: rgba(37, 99, 235, 0.12); color: var(--rom-primary); border-color: rgba(37, 99, 235, 0.35); }
.rom-days-counter.is-soon { background: var(--rom-amber-bg); color: var(--rom-amber-text); border-color: var(--rom-amber); }
.rom-days-counter.is-today { background: var(--rom-green-bg); color: var(--rom-green-text); border-color: var(--rom-green-border); }
.rom-days-counter.is-overdue { background: var(--rom-red-bg); color: var(--rom-red-text); border-color: var(--rom-red-border); }
.rom-days-counter.is-future-arrival { background: rgba(124, 58, 237, 0.14); color: #8b5cf6; border-color: rgba(139, 92, 246, 0.35); }

/* Housekeeping & Notes */
.rom-control-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.rom-control-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--rom-text-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rom-housekeeping {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border-radius: 10px;
	background: var(--rom-bg);
	border: 1px solid var(--rom-border);
}

.rom-hk-switches {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.rom-hk-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 8px 10px;
	border-radius: 9px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text-muted);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
	text-align: left;
}

.rom-hk-toggle:disabled {
	opacity: 0.78;
	cursor: not-allowed;
}

.rom-hk-toggle.is-done {
	background: var(--rom-green-bg);
	border-color: var(--rom-green);
	color: var(--rom-green-text);
}

.rom-switch-track {
	width: 32px;
	height: 18px;
	border-radius: 999px;
	background: var(--rom-border-strong);
	position: relative;
	flex-shrink: 0;
}

.rom-hk-toggle.is-done .rom-switch-track {
	background: var(--rom-green);
}

.rom-switch-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #ffffff;
	position: absolute;
	top: 2px;
	left: 2px;
	transition: transform 0.14s ease;
}

.rom-hk-toggle.is-done .rom-switch-thumb {
	transform: translateX(14px);
}

.rom-hk-actions-row {
	display: flex;
	gap: 6px;
	align-items: center;
}

.rom-hk-reset-btn {
	flex: 1;
	border: 1px dashed var(--rom-border-strong);
	background: transparent;
	color: var(--rom-text-muted);
	border-radius: 8px;
	padding: 5px 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

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

.rom-vacate-btn {
	border: 1px solid rgba(37, 99, 235, 0.45);
	background: rgba(37, 99, 235, 0.08);
	color: var(--rom-primary);
	border-radius: 8px;
	padding: 5px 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.rom-vacate-btn[hidden] {
	display: none;
}

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

.rom-note-status {
	font-size: 11px;
	font-weight: 600;
}

.rom-note-status.is-saved {
	color: var(--rom-green-text);
}

.rom-notes-input {
	resize: vertical;
	min-height: 54px;
	line-height: 1.4;
}

.rom-notes-input:disabled {
	background: var(--rom-surface-muted);
	color: var(--rom-text-muted);
	resize: none;
	cursor: default;
	opacity: 1;
}

.rom-maint-reason-row[hidden] {
	display: none;
}

.rom-maint-reason-readonly {
	font-size: 12px;
	color: var(--rom-amber-text);
	background: var(--rom-amber-bg);
	padding: 5px 9px;
	border-radius: 7px;
}

.rom-card-footer {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--rom-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.rom-updated-meta {
	font-size: 12px;
	color: var(--rom-text-subtle);
}

.rom-delete-actions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Compact Table View */
.rom-rooms-table-wrap,
.rom-audit-table-wrap {
	width: 100%;
	overflow-x: auto;
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	box-shadow: var(--rom-shadow);
}

.rom-audit-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	padding: 12px 4px;
}

.rom-pw-live-status {
	font-size: 12px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface-muted);
	color: var(--rom-text-muted);
}

.rom-pw-live-status.is-ok {
	background: var(--rom-green-bg);
	border-color: var(--rom-green-border);
	color: var(--rom-green-text);
}

.rom-pw-live-status.is-warn {
	background: var(--rom-amber-bg);
	border-color: rgba(217, 119, 6, 0.35);
	color: var(--rom-amber-text);
}

.rom-rooms-table,
.rom-audit-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rom-rooms-table th,
.rom-rooms-table td,
.rom-audit-table th,
.rom-audit-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--rom-border);
	text-align: left;
	vertical-align: middle;
}

.rom-rooms-table th,
.rom-audit-table th {
	background: var(--rom-surface-muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rom-text-subtle);
	white-space: nowrap;
}

.rom-rooms-table tr.is-unlocked td {
	background: rgba(37, 99, 235, 0.05);
}

.rom-table-actions {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}

.rom-table-input {
	width: 100%;
	min-width: 115px;
	font-family: inherit;
	font-size: 13px;
	color: var(--rom-text);
	background: var(--rom-surface);
	border: 1px solid var(--rom-border-strong);
	border-radius: 7px;
	padding: 5px 8px;
	min-height: 32px;
	box-sizing: border-box;
}

.rom-table-input:focus {
	outline: none;
	border-color: var(--rom-primary);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

textarea.rom-table-input {
	min-width: 180px;
	min-height: 52px;
	resize: vertical;
	line-height: 1.35;
}

.rom-table-note-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	margin-top: 5px;
	flex-wrap: wrap;
}

.rom-table-note-preview {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	max-width: 240px;
}

.rom-hk-note-read {
	font-size: 12px;
	color: var(--rom-text-muted);
	background: var(--rom-bg);
	border: 1px solid var(--rom-border);
	border-radius: 8px;
	padding: 6px 9px;
	white-space: pre-wrap;
	word-break: break-word;
}

/* Account, Sessions & Users */
.rom-account-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
	gap: 16px;
}

.rom-account-card {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	padding: 20px;
	box-shadow: var(--rom-shadow);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rom-sessions-card {
	grid-column: 1 / -1;
}

.rom-account-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--rom-border);
}

.rom-account-card-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.rom-account-meta-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.rom-account-pill {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--rom-surface-muted);
	border: 1px solid var(--rom-border);
}

.rom-account-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rom-account-name-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.rom-sessions-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 10px;
}

.rom-session-item {
	background: var(--rom-bg);
	border: 1px solid var(--rom-border);
	border-radius: 10px;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.rom-session-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.rom-session-device {
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.rom-device-badge {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 999px;
	background: var(--rom-green-bg);
	color: var(--rom-green-text);
}

.rom-session-meta {
	font-size: 12px;
	color: var(--rom-text-subtle);
}

.rom-add-user-form {
	display: grid;
	grid-template-columns: repeat(4, minmax(150px, 1fr));
	gap: 10px;
	align-items: end;
}

.rom-users-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
}

.rom-user-card {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	padding: 16px;
	box-shadow: var(--rom-shadow);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rom-user-card-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rom-user-avatar {
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.14);
	color: var(--rom-primary);
	font-weight: 800;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.rom-user-identity {
	min-width: 0;
	flex: 1 1 auto;
}

.rom-user-display {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.rom-user-handle {
	font-size: 12px;
	color: var(--rom-text-subtle);
}

.rom-you-badge {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.14);
	color: var(--rom-primary);
	margin-left: 6px;
}

.rom-role-badge {
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.rom-role-badge.is-administrator {
	background: rgba(37, 99, 235, 0.14);
	color: var(--rom-primary);
}

.rom-role-badge.is-user {
	background: var(--rom-green-bg);
	color: var(--rom-green-text);
}

.rom-user-actions {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--rom-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Modals & Calendar */
body.rom-cal-open {
	overflow: hidden;
}

.rom-cal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.rom-cal-backdrop[hidden] {
	display: none;
}

.rom-cal-dialog {
	width: 100%;
	max-width: 390px;
	background: var(--rom-surface);
	color: var(--rom-text);
	border: 1px solid var(--rom-border);
	border-radius: 16px;
	padding: 18px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 92vh;
	overflow-y: auto;
}

.rom-user-modal {
	max-width: 470px;
}

.rom-print-modal {
	max-width: 780px;
}

.rom-print-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.rom-cal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.rom-cal-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

.rom-cal-subtitle {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--rom-text-subtle);
}

.rom-cal-close-btn {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface-muted);
	color: var(--rom-text);
	font-size: 20px;
	cursor: pointer;
}

.rom-cal-mode-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.rom-cal-mode-tab {
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-bg);
	color: var(--rom-text);
	border-radius: 10px;
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	cursor: pointer;
	text-align: left;
}

.rom-cal-mode-tab.is-active {
	border-color: var(--rom-primary);
	background: rgba(37, 99, 235, 0.1);
}

.rom-cal-tab-label {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--rom-text-subtle);
}

.rom-cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rom-cal-nav-btn {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface);
	color: var(--rom-text);
	font-size: 18px;
	cursor: pointer;
}

.rom-cal-weekdays,
.rom-cal-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.rom-cal-weekday {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--rom-text-subtle);
	padding: 4px 0;
}

.rom-cal-day {
	height: 38px;
	border-radius: 8px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--rom-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.rom-cal-day:hover:not(:disabled) {
	background: var(--rom-surface-muted);
}

.rom-cal-day.is-outside {
	opacity: 0.4;
}

.rom-cal-day.is-today {
	border-color: var(--rom-primary);
}

.rom-cal-day.is-in-range {
	background: rgba(37, 99, 235, 0.14);
}

.rom-cal-day.is-selected {
	background: var(--rom-primary);
	color: #ffffff;
}

.rom-cal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 8px;
	border-top: 1px solid var(--rom-border);
}

.rom-cal-footer-right {
	display: inline-flex;
	gap: 8px;
	margin-left: auto;
}

/* Printable Housekeeping Sheet */
.rom-print-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rom-print-table th,
.rom-print-table td {
	padding: 8px 10px;
	border: 1px solid var(--rom-border);
	text-align: left;
}

.rom-print-box {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 1.5px solid currentColor;
	border-radius: 3px;
	vertical-align: middle;
}

.rom-empty-state {
	grid-column: 1 / -1;
	background: var(--rom-surface);
	border: 1px dashed var(--rom-border-strong);
	border-radius: var(--rom-radius);
	padding: 28px 16px;
	text-align: center;
	color: var(--rom-text-subtle);
}

.rom-audit-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 6px;
	background: var(--rom-surface-muted);
	border: 1px solid var(--rom-border);
}

.rom-audit-badge.is-auth { color: var(--rom-primary); }
.rom-audit-badge.is-fail { background: var(--rom-red-bg); color: var(--rom-red-text); border-color: var(--rom-red-border); }

@media (max-width: 1040px) {
	.rom-summary-bar {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.rom-add-form-v2,
	.rom-add-user-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.rom-app {
		padding: 14px 10px 36px;
	}
	.rom-summary-bar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.rom-add-form-v2,
	.rom-add-user-form,
	.rom-account-name-row,
	.rom-inline-meta-edit {
		grid-template-columns: 1fr;
	}
	.rom-rooms-grid {
		grid-template-columns: 1fr;
	}
	.rom-cal-backdrop {
		align-items: flex-end;
		padding: 0;
	}
	.rom-cal-dialog {
		max-width: 100%;
		border-radius: 16px 16px 0 0;
	}
}

/* v2.1 Hardening, Views, Housekeeping, Timeline & Security UI */
.rom-view-switcher {
	display: inline-flex;
	align-items: center;
	background: var(--rom-surface-muted);
	border: 1px solid var(--rom-border);
	border-radius: 10px;
	padding: 2px;
	gap: 2px;
	flex-wrap: wrap;
}

.rom-view-btn {
	border: none;
	background: transparent;
	color: var(--rom-text-subtle);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.rom-view-btn.is-active {
	background: var(--rom-surface);
	color: var(--rom-primary);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.rom-stat-clickable {
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.12s ease;
}

.rom-stat-clickable:hover {
	border-color: var(--rom-primary);
	transform: translateY(-1px);
}

.rom-stat-sheets-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 12px;
	color: inherit;
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.92;
}

.rom-sheet-age-badge {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--rom-surface-muted);
	color: var(--rom-text-subtle);
	border: 1px solid var(--rom-border);
}

.rom-sheet-age-badge.is-overdue {
	background: var(--rom-red-bg);
	color: var(--rom-red-text);
	border-color: var(--rom-red-border);
}

.rom-hk-timestamps {
	font-size: 11px;
	color: var(--rom-text-subtle);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.rom-hk-history-meta {
	font-size: 11px;
	color: var(--rom-text-subtle);
	line-height: 1.35;
}

.rom-room-card.is-just-synced {
	outline: 2px solid var(--rom-primary);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* Dedicated Housekeeping Mode & 7-Day Timeline Views */
.rom-rooms-grid.is-single-col {
	grid-template-columns: 1fr;
}

.rom-hk-priority-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 12px;
}

.rom-hk-priority-card {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-left: 5px solid var(--rom-amber-border);
	border-radius: var(--rom-radius);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: var(--rom-shadow);
}

.rom-hk-priority-card.is-urgent {
	border-left-color: var(--rom-red-border);
}

.rom-hk-priority-card.is-all-done {
	border-left-color: var(--rom-green-text);
	opacity: 0.85;
}

.rom-hk-priority-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.rom-hk-priority-btn {
	min-height: 40px;
	border-radius: 9px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-bg);
	color: var(--rom-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	padding: 6px 8px;
}

.rom-hk-priority-btn.is-done {
	background: var(--rom-green-bg);
	color: var(--rom-green-text);
	border-color: transparent;
}

.rom-timeline-wrap {
	background: var(--rom-surface);
	border: 1px solid var(--rom-border);
	border-radius: var(--rom-radius);
	padding: 14px;
	overflow-x: auto;
	box-shadow: var(--rom-shadow);
}

.rom-timeline-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.rom-timeline-legend {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--rom-text-subtle);
}

.rom-tl-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	margin-right: 4px;
	vertical-align: middle;
}

.rom-tl-dot.is-in { background: #16a34a; }
.rom-tl-dot.is-stay { background: #2563eb; }
.rom-tl-dot.is-out { background: #d97706; }
.rom-tl-dot.is-overdue { background: #dc2626; }
.rom-tl-dot.is-sheetday { background: #9333ea; }

.rom-timeline-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-top: 1px solid var(--rom-border);
	border-left: 1px solid var(--rom-border);
	min-width: 720px;
	font-size: 12px;
}

.rom-timeline-table th,
.rom-timeline-table td {
	border-right: 1px solid var(--rom-border);
	border-bottom: 1px solid var(--rom-border);
	padding: 7px 8px;
	text-align: center;
}

.rom-timeline-table th:first-child,
.rom-timeline-table td:first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	background: var(--rom-surface);
	box-shadow: inset -1px 0 0 var(--rom-border-strong), 2px 0 6px rgba(15, 23, 42, 0.06);
	text-align: left;
	min-width: 160px;
	font-weight: 700;
}

.rom-timeline-table thead th:first-child {
	z-index: 3;
	background: var(--rom-surface-muted);
}

.rom-tl-sheetday-th {
	background: rgba(147, 51, 234, 0.14);
	color: #7e22ce;
}

.rom-tl-sheetday-col {
	background: rgba(147, 51, 234, 0.06);
}

.rom-tl-cell {
	font-size: 11px;
	font-weight: 700;
	border-radius: 6px;
	padding: 4px 6px;
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
}

.rom-tl-in { background: rgba(22, 163, 74, 0.16); color: #15803d; }
.rom-tl-stay { background: rgba(37, 99, 235, 0.14); color: var(--rom-primary); }
.rom-tl-stay.is-sheet-planned { box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.55); }
.rom-tl-out { background: rgba(217, 119, 6, 0.16); color: #b45309; }
.rom-tl-overdue { background: var(--rom-red-bg); color: var(--rom-red-text); }
.rom-tl-sheetday { background: rgba(147, 51, 234, 0.14); color: #7e22ce; }

.rom-bulk-vacate-btn {
	border-color: #d97706 !important;
	color: #b45309 !important;
	font-weight: 700;
}

.rom-hk-floor-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	padding: 10px 14px;
	margin-bottom: 12px;
	border-radius: 10px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface-muted);
}

.rom-hk-floor-btns {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.rom-print-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--rom-text);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface);
}

.rom-print-floor-row td {
	background: #f1f5f9 !important;
	color: #0f172a !important;
	font-weight: 800;
	text-align: left;
	font-size: 12px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.rom-print-sign-cell {
	text-align: center;
	color: #94a3b8;
	min-width: 56px;
}

.rom-conflict-dialog {
	max-width: 640px;
	width: 100%;
}

.rom-conflict-diff {
	overflow-x: auto;
	margin-bottom: 14px;
}

.rom-conflict-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rom-conflict-table th,
.rom-conflict-table td {
	border: 1px solid var(--rom-border);
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.rom-conflict-table td.is-mine {
	background: rgba(37, 99, 235, 0.08);
	font-weight: 600;
}

.rom-conflict-table td.is-server {
	background: rgba(217, 119, 6, 0.08);
}

.rom-app[data-rom-theme="dark"] .rom-tl-sheetday-th,
.rom-app[data-rom-theme="dark"] .rom-tl-sheetday {
	background: rgba(168, 85, 247, 0.22);
	color: #e9d5ff;
}

.rom-app[data-rom-theme="dark"] .rom-tl-sheetday-col {
	background: rgba(168, 85, 247, 0.08);
}

.rom-app[data-rom-theme="dark"] .rom-tl-in {
	background: rgba(34, 197, 94, 0.2);
	color: #86efac;
}

.rom-app[data-rom-theme="dark"] .rom-tl-out,
.rom-app[data-rom-theme="dark"] .rom-bulk-vacate-btn {
	color: #fcd34d !important;
	border-color: #f59e0b !important;
}

.rom-app[data-rom-theme="dark"] .rom-print-floor-row td {
	background: #334155 !important;
	color: #f1f5f9 !important;
}

@media (max-width: 640px) {
	.rom-hk-floor-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.rom-hk-floor-btns {
		width: 100%;
	}
	.rom-hk-floor-btns .rom-btn {
		flex: 1 1 auto;
	}
	.rom-print-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.rom-bulk-floor-wrap {
		width: 100%;
	}
	.rom-sessions-head-actions {
		width: 100%;
		justify-content: flex-start;
	}
}

.rom-occ-progress {
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: var(--rom-surface-muted);
	border: 1px solid var(--rom-border);
	overflow: hidden;
	margin: 4px 0 6px;
}

.rom-occ-progress-fill {
	height: 100%;
	width: 0%;
	transition: width 160ms ease;
	background: var(--rom-primary);
}

.rom-occ-progress.is-empty .rom-occ-progress-fill { background: #16a34a; }
.rom-occ-progress.is-partial .rom-occ-progress-fill { background: #d97706; }
.rom-occ-progress.is-full .rom-occ-progress-fill { background: #dc2626; }
.rom-occ-progress.is-maint .rom-occ-progress-fill { background: #94a3b8; }

.rom-hk-progress-banner {
	padding: 10px 14px;
	margin-bottom: 10px;
	border-radius: 10px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rom-hk-progress-text {
	font-size: 13px;
	font-weight: 700;
	color: var(--rom-text);
}

.rom-hk-progress-track {
	width: 100%;
	height: 7px;
	border-radius: 999px;
	background: var(--rom-surface-muted);
	overflow: hidden;
}

.rom-hk-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #2563eb, #16a34a);
	transition: width 180ms ease;
}

.rom-search-wrap {
	position: relative;
}

.rom-search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: var(--rom-text-subtle);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
}

.rom-bulk-floor-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.rom-bulk-floor-input {
	width: 130px;
	min-height: 30px;
	padding: 4px 8px;
	border-radius: 6px;
	border: 1px solid var(--rom-border);
	background: var(--rom-surface);
	color: var(--rom-text);
	font-size: 12px;
}

.rom-shortcuts-list {
	list-style: none;
	margin: 0;
	padding: 4px 0 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 13px;
}

.rom-shortcuts-list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rom-shortcuts-list kbd {
	display: inline-block;
	min-width: 28px;
	text-align: center;
	padding: 2px 7px;
	border-radius: 6px;
	border: 1px solid var(--rom-border-strong);
	background: var(--rom-surface-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	font-weight: 700;
	color: var(--rom-text);
}

.rom-tl-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.rom-tl-range-switch {
	display: inline-flex;
	gap: 4px;
}

.rom-tl-room-btn {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: var(--rom-primary);
	cursor: pointer;
	text-align: left;
}

.rom-tl-room-btn:hover {
	text-decoration: underline;
}

.rom-timeline-table.is-14d {
	min-width: 1180px;
}

.rom-print-table.is-compact th,
.rom-print-table.is-compact td {
	padding: 3px 5px;
	font-size: 11px;
}

.rom-sessions-head-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.rom-app :focus-visible,
.rom-cal-backdrop :focus-visible {
	outline: 2px solid var(--rom-primary, #2563eb);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.rom-standalone-body,
	.rom-app *,
	.rom-app *::before,
	.rom-app *::after,
	.rom-cal-backdrop * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (forced-colors: active) {
	.rom-room-card,
	.rom-panel,
	.rom-stat-card,
	.rom-cal-modal,
	.rom-btn,
	.rom-filter-pill,
	.rom-view-btn,
	.rom-badge,
	.rom-sync-pill {
		border: 1px solid ButtonBorder;
	}
	.rom-filter-pill.is-active,
	.rom-view-btn.is-active,
	.rom-btn-primary {
		border: 2px solid Highlight;
	}
	.rom-app :focus-visible,
	.rom-cal-backdrop :focus-visible {
		outline: 2px solid Highlight;
		outline-offset: 2px;
	}
}

@media print {
	.rom-standalone-body,
	.rom-standalone-body.rom3-dark-page,
	body {
		background: #ffffff !important;
		color: #000000 !important;
	}
	.rom-app,
	.rom-app[data-rom-theme="dark"] {
		--rom-bg: #ffffff;
		--rom-surface: #ffffff;
		--rom-surface-muted: #f8fafc;
		--rom-border: #cbd5e1;
		--rom-border-strong: #94a3b8;
		--rom-text: #000000;
		--rom-text-muted: #334155;
		--rom-text-subtle: #475569;
		color: #000000 !important;
		background: #ffffff !important;
		padding: 0 !important;
	}
	.rom-print-table thead {
		display: table-header-group;
	}
	.rom-print-table tr {
		break-inside: avoid;
		page-break-inside: avoid;
	}
	.rom-print-floor-row {
		break-after: avoid;
		page-break-after: avoid;
	}
	.rom-topbar,
	.rom-subnav,
	.rom-announcement-bar,
	.rom-summary-bar,
	.rom-ops-strip,
	.rom-add-panel,
	.rom-toolbar,
	.rom-floor-pills,
	.rom-bulk-bar,
	.rom-toast-region,
	.rom-rooms-grid,
	.rom-footer,
	.rom-cal-backdrop:not(#rom3-print-backdrop),
	.rom-no-print {
		display: none !important;
	}
	.rom-cal-backdrop#rom3-print-backdrop {
		position: static !important;
		background: transparent !important;
		display: block !important;
		padding: 0 !important;
	}
	.rom-print-modal {
		max-width: 100% !important;
		border: none !important;
		box-shadow: none !important;
		background: #ffffff !important;
		color: #000000 !important;
		max-height: none !important;
		padding: 0 !important;
	}
}
