/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
    /* Core palette */
    --sand:       #C8A97E;
    --sand-lt:    #FDF8F2;
    --sand-dk:    #6B4F2A;
    --oak:        #8B6E52;
    --linen:      #E8DDD0;
    --espresso:   #3D3530;
    --cream:      #F5F1EC;

    /* Semantic */
    --sage:         #5B8A6F;
    --sage-lt:      #D6EDE3;
    --terra:        #D4855A;
    --terra-lt:     #FAE8DC;
    --violet:       #7F77DD;
    --violet-lt:    #EEEDFE;
    --blue:         #378ADD;
    --blue-lt:      #E6F1FB;
    --teal:         #1D9E75;
    --danger:       #A32D2D;
    --danger-lt:    #FCEBEB;
    --danger-border:#F09595;

    /* Borders */
    --border:        0.5px solid var(--linen);
    --border-active: 0.5px solid var(--sand);
    --border-danger: 0.5px solid var(--danger-border);

    /* Radius */
    --r-xs:   4px;
    --r-sm:   6px;
    --r-nav:  7px;
    --r-md:   8px;
    --r-row:  9px;
    --r-card: 10px;
    --r-lg:   12px;
    --r-modal:14px;
    --r-pill: 20px;
    --r-full: 50%;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    background: var(--cream);
    color: var(--espresso);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--espresso);
    margin: 0;
}

a { color: var(--sand); text-decoration: none; }
a:hover { color: var(--sand-dk); }

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.logo-text   { font-family: 'DM Serif Display', serif; color: var(--espresso); font-size: 1.25rem; line-height: 1; }
.logo-accent { color: var(--sand); }
.logo-text.on-dark { color: var(--cream); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    border-radius: var(--r-md);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: opacity 0.15s, filter 0.15s;
    line-height: 1;
    text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(0.94); }
.btn:disabled, .btn-dimmed { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--sand);    color: var(--sand-dk); }
.btn-success { background: var(--sage);    color: var(--sage-lt); }
.btn-move    { background: var(--violet);  color: var(--violet-lt); }
.btn-dark    { background: var(--espresso);color: var(--cream); }
.btn-danger  { background: transparent;    border: var(--border-danger); color: var(--danger); }
.btn-ghost   { background: transparent;    border: var(--border); color: var(--oak); }
.btn-sm      { padding: 5px 12px; font-size: 11px; border-radius: var(--r-sm); }
.btn-lg      { padding: 12px 24px; font-size: 14px; border-radius: var(--r-card); }
.btn-icon    { padding: 6px; border-radius: var(--r-sm); }

/* Reset Bootstrap button conflicts */
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--sand); color: var(--sand-dk); filter: brightness(0.94); }
.btn-outline-primary { border-color: var(--sand); color: var(--sand); background: transparent; }
.btn-outline-primary:hover { background: var(--sand); color: var(--sand-dk); }

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.tag { font-size: 11px; font-weight: 500; border-radius: var(--r-xs); padding: 2px 8px; display: inline-block; font-family: 'DM Sans'; }
.tag-neutral { background: var(--linen);    color: var(--sand-dk); }
.tag-sand    { background: var(--sand-lt);  color: var(--sand-dk); border: 0.5px solid var(--sand); }
.tag-sage    { background: var(--sage-lt);  color: #2B6B4A; }
.tag-terra   { background: var(--terra-lt); color: #7A3A18; }
.tag-blue    { background: var(--blue-lt);  color: #0C447C; }
.tag-violet  { background: var(--violet-lt);color: #3C3489; }
.tag-danger  { background: var(--danger-lt);color: var(--danger); }

/* ── Filter chips ─────────────────────────────────────────────────────────── */
.chip        { font-size: 12px; padding: 5px 13px; border-radius: var(--r-pill); border: var(--border); background: white; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; }
.chip.active { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.chip.active-alt { background: var(--linen); border-color: var(--linen); color: var(--sand-dk); }
.chips-row   { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Form fields ──────────────────────────────────────────────────────────── */
.field-label { font-size: 11px; font-weight: 600; color: var(--oak); letter-spacing: 0.3px; margin-bottom: 5px; display: block; font-family: 'DM Sans'; text-transform: uppercase; }
.field-input {
    width: 100%; background: white; border: var(--border);
    border-radius: var(--r-md); padding: 9px 13px;
    font-size: 13px; color: var(--espresso); font-family: 'DM Sans';
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus   { border-color: var(--sand); box-shadow: 0 0 0 2px rgba(200,169,126,0.15); }
.field-input.changed { border-color: var(--sand); background: var(--sand-lt); }
.field-hint          { font-size: 10px; color: #B4A898; margin-top: 4px; font-family: 'DM Sans'; }
.field-hint.changed  { color: var(--sand); }
.field-group         { margin-bottom: 16px; }

/* Override Bootstrap form-control */
.form-control, .form-select {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--espresso);
    border: var(--border);
    border-radius: var(--r-md);
    background: white;
    padding: 9px 13px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--sand);
    box-shadow: 0 0 0 2px rgba(200,169,126,0.15);
    color: var(--espresso);
}
.form-label {
    font-size: 11px; font-weight: 600; color: var(--oak);
    letter-spacing: 0.3px; text-transform: uppercase;
    margin-bottom: 5px;
}
.form-text { font-size: 10px; color: #B4A898; margin-top: 4px; }

/* ── Avatars ──────────────────────────────────────────────────────────────── */
.avatar    { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-family: 'DM Sans'; flex-shrink: 0; }
.avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-sand   { background: var(--sand);   color: var(--sand-dk); }
.avatar-sage   { background: var(--sage);   color: var(--sage-lt); }
.avatar-violet { background: var(--violet); color: var(--violet-lt); }
.avatar-linen  { background: var(--linen);  color: var(--oak); }

/* ── Panels / cards ───────────────────────────────────────────────────────── */
.panel       { background: var(--cream); border-radius: var(--r-card); padding: 14px 16px; border: var(--border); }
.panel-title { font-size: 12px; font-weight: 600; color: var(--espresso); margin-bottom: 12px; font-family: 'DM Sans'; }
.card-white  { background: white; border-radius: var(--r-card); border: var(--border); padding: 14px 16px; }

/* ── Breadcrumb / path ────────────────────────────────────────────────────── */
.path     { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--oak); font-family: 'DM Sans'; }
.path-sep { color: var(--sand); }
.path a   { color: var(--oak); }
.path a:hover { color: var(--sand); }

/* ── Progress dots ────────────────────────────────────────────────────────── */
.prog-dots  { display: flex; gap: 6px; align-items: center; }
.prog-dot   { width: 7px; height: 7px; border-radius: 50%; }
.prog-dot.done   { background: var(--sage); }
.prog-dot.active { background: var(--sand); }
.prog-dot.idle   { background: rgba(245,241,236,0.25); }

/* ── Event dots ───────────────────────────────────────────────────────────── */
.event-dot        { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.event-dot.add    { background: var(--sage); }
.event-dot.edit   { background: var(--sand); }
.event-dot.move   { background: var(--violet); }
.event-dot.scan   { background: var(--blue); }
.event-dot.create { background: var(--teal); }
.event-dot.del    { background: var(--terra); }

/* ── QR status ────────────────────────────────────────────────────────────── */
.qr-active { font-size: 10px; color: var(--sage); display: flex; align-items: center; gap: 4px; font-family: 'DM Sans'; }
.qr-none   { font-size: 10px; color: #B4A898;    display: flex; align-items: center; gap: 4px; font-family: 'DM Sans'; }

/* ── Changed badge ────────────────────────────────────────────────────────── */
.changed-badge { font-size: 9px; background: var(--sand-lt); color: var(--sand); border: 0.5px solid var(--sand); border-radius: var(--r-xs); padding: 1px 6px; margin-left: 6px; font-family: 'DM Sans'; }

/* ── Toggle ───────────────────────────────────────────────────────────────── */
.toggle     { width: 36px; height: 20px; border-radius: 10px; display: flex; align-items: center; padding: 2px; cursor: pointer; transition: background 0.2s; border: none; }
.toggle.on  { background: var(--sand); justify-content: flex-end; }
.toggle.off { background: var(--linen); justify-content: flex-start; }
.toggle-dot { width: 16px; height: 16px; border-radius: 50%; background: white; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--oak); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 0.95rem; color: var(--espresso); margin-bottom: 6px; }
.empty-state p  { font-size: 12px; color: var(--oak); margin-bottom: 16px; }

/* ── Page loading ─────────────────────────────────────────────────────────── */
.page-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; color: var(--oak); }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
    background: var(--cream);
    border-bottom: var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    flex-shrink: 0;
}
.topbar-left  { display: flex; flex-direction: column; gap: 2px; }
.topbar-title { font-family: 'DM Serif Display', serif; font-size: 1.375rem; color: var(--espresso); letter-spacing: -0.3px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* ── Danger zone ──────────────────────────────────────────────────────────── */
.danger-zone { background: var(--danger-lt); border: var(--border-danger); border-radius: var(--r-card); padding: 14px 16px; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(61,53,48,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card    { background: white; border-radius: var(--r-modal); width: 100%; max-width: 440px; box-shadow: 0 24px 64px rgba(0,0,0,0.15); overflow: hidden; }
.modal-header  { padding: 20px 24px 16px; border-bottom: var(--border); }
.modal-header h3 { font-size: 1.0625rem; }
.modal-body    { padding: 20px 24px; }
.modal-footer  { padding: 16px 24px; border-top: var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--cream); }

/* ── Table ────────────────────────────────────────────────────────────────── */
.z-table { width: 100%; border-collapse: collapse; }
.z-table th {
    text-align: left; font-size: 11px; font-weight: 600; color: var(--oak);
    text-transform: uppercase; letter-spacing: 0.3px;
    padding: 8px 12px; border-bottom: var(--border);
    font-family: 'DM Sans'; background: var(--cream);
}
.z-table td { padding: 11px 12px; border-bottom: var(--border); font-size: 13px; color: var(--espresso); }
.z-table tr:last-child td { border-bottom: none; }
.z-table tr:hover td { background: var(--sand-lt); cursor: pointer; }
.z-table-wrap { background: white; border-radius: var(--r-card); border: var(--border); overflow: hidden; }

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
}

.login-left {
    width: 320px;
    flex-shrink: 0;
    background: var(--espresso);
    display: flex;
    flex-direction: column;
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(200,169,126,0.08);
}

.login-left-logo { margin-bottom: 40px; }

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.login-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: rgba(200,169,126,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.login-feature-text strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 2px;
    font-family: 'DM Sans';
}

.login-feature-text span {
    font-size: 11px;
    color: rgba(245,241,236,0.5);
    font-family: 'DM Sans';
    line-height: 1.4;
}

.login-self-hosted {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(245,241,236,0.45);
    font-family: 'DM Sans';
}

.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: white;
}

.login-right-inner { width: 100%; max-width: 340px; }

.login-right h1 {
    font-size: 1.625rem;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--oak);
    margin-bottom: 32px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.login-divider::before,
.login-divider::after { content: ''; flex: 1; height: 0.5px; background: var(--linen); }
.login-divider span   { font-size: 11px; color: #B4A898; font-family: 'DM Sans'; }

.provider-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--r-md);
    border: var(--border);
    background: white;
    color: var(--espresso);
    font-weight: 500;
    font-size: 13px;
    font-family: 'DM Sans';
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    margin-bottom: 10px;
}
.provider-btn:hover {
    border-color: var(--sand);
    box-shadow: 0 0 0 2px rgba(200,169,126,0.12);
    text-decoration: none;
    color: var(--espresso);
}
.provider-icon { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 640px) {
    .login-left { display: none; }
    .login-right { padding: 32px 24px; }
}

/* ── Onboarding wizard ────────────────────────────────────────────────────── */
.ob-wrap {
    min-height: 100vh;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ob-shell {
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 540px;
    background: white;
    border-radius: var(--r-lg);
    border: var(--border);
    box-shadow: 0 8px 40px rgba(61,53,48,0.08);
    overflow: hidden;
}

.ob-left {
    width: 260px;
    flex-shrink: 0;
    background: var(--espresso);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.ob-left-logo { margin-bottom: 32px; }

.ob-step-list { flex: 1; }

.ob-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.ob-step-item.active  { opacity: 1; }
.ob-step-item.done    { opacity: 0.65; }

.ob-step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    font-family: 'DM Sans';
    flex-shrink: 0;
    background: rgba(245,241,236,0.1);
    color: rgba(245,241,236,0.5);
    border: 0.5px solid rgba(245,241,236,0.2);
}
.ob-step-item.active .ob-step-num { background: var(--sand); color: var(--sand-dk); border-color: var(--sand); }
.ob-step-item.done   .ob-step-num { background: var(--sage); color: var(--sage-lt); border-color: var(--sage); }

.ob-step-label strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 2px;
    font-family: 'DM Sans';
}
.ob-step-label span {
    font-size: 11px;
    color: rgba(245,241,236,0.45);
    font-family: 'DM Sans';
    line-height: 1.4;
}

.ob-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ob-content {
    flex: 1;
    padding: 36px 40px 24px;
    overflow-y: auto;
}

.ob-content h2 {
    font-size: 1.375rem;
    margin-bottom: 6px;
}

.ob-content .ob-subtitle {
    font-size: 13px;
    color: var(--oak);
    margin-bottom: 28px;
}

.ob-footer {
    padding: 16px 40px;
    border-top: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cream);
}

.ob-footer-left  { display: flex; align-items: center; gap: 10px; }
.ob-footer-right { display: flex; align-items: center; gap: 10px; }

/* Room emoji grid */
.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room-tile {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: var(--border);
    border-radius: var(--r-card);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: 'DM Sans';
    font-size: 11px;
    color: var(--oak);
    background: white;
    padding: 10px;
    text-align: center;
}
.room-tile .room-emoji { font-size: 1.5rem; line-height: 1; }
.room-tile:hover    { border-color: var(--sand); background: var(--sand-lt); }
.room-tile.selected { border-color: var(--sand); background: var(--sand-lt); color: var(--sand-dk); }

/* Success screen */
.ob-success { text-align: center; padding: 20px 0; }
.ob-success .ob-success-icon { font-size: 3.5rem; margin-bottom: 16px; }
.ob-success h2 { font-size: 1.5rem; margin-bottom: 8px; }
.ob-success p  { font-size: 13px; color: var(--oak); max-width: 320px; margin: 0 auto; }

/* ── App shell layout ─────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: white;
}

.content-area {
    flex: 1;
    padding: 20px 24px;
    background: white;
    min-height: 0;
    overflow-y: auto;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
    width: 180px;
    flex-shrink: 0;
    background: var(--espresso);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 20px 0 16px;
}

.sb-logo {
    padding: 0 16px 16px;
    border-bottom: 0.5px solid rgba(245,241,236,0.1);
    margin-bottom: 12px;
}

.sb-household {
    padding: 10px 16px 14px;
    border-bottom: 0.5px solid rgba(245,241,236,0.1);
    margin-bottom: 8px;
    cursor: pointer;
}
.sb-hh-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--cream);
    font-family: 'DM Sans';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-hh-tag {
    font-size: 10px;
    color: rgba(245,241,236,0.45);
    font-family: 'DM Sans';
    margin-top: 1px;
}

.sb-nav {
    flex: 1;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
}

.sb-section {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(245,241,236,0.3);
    font-family: 'DM Sans';
    padding: 12px 8px 4px;
}

.sb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--r-nav);
    color: rgba(245,241,236,0.65);
    font-size: 12.5px;
    font-weight: 500;
    font-family: 'DM Sans';
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    margin-bottom: 1px;
}
.sb-item:hover {
    background: rgba(245,241,236,0.08);
    color: var(--cream);
    text-decoration: none;
}
.sb-item.active {
    background: rgba(200,169,126,0.18);
    color: var(--sand);
}
.sb-item svg { flex-shrink: 0; opacity: 0.8; }
.sb-item.active svg { opacity: 1; }

.sb-bottom {
    padding: 12px 16px 0;
    border-top: 0.5px solid rgba(245,241,236,0.1);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sb-user-info { min-width: 0; }
.sb-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--cream);
    font-family: 'DM Sans';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-signout {
    font-size: 10px;
    color: rgba(245,241,236,0.4);
    font-family: 'DM Sans';
    text-decoration: none;
}
.sb-signout:hover { color: rgba(245,241,236,0.7); text-decoration: none; }

/* ── Stats row ────────────────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card  { background: var(--cream); border-radius: var(--r-card); padding: 14px 16px; }
.stat-num   { font-size: 28px; font-weight: 500; color: var(--espresso); line-height: 1; font-family: 'DM Sans'; }
.stat-lbl   { font-size: 11px; color: var(--oak); margin-top: 4px; font-family: 'DM Sans'; }
.stat-sub   { font-size: 11px; margin-top: 4px; font-family: 'DM Sans'; color: var(--sage); }
.stat-sub.warn  { color: var(--terra); }
.stat-sub.muted { color: #B4A898; }

/* ── Panel header / link ──────────────────────────────────────────────────── */
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-header .panel-title { margin-bottom: 0; }
.panel-link { font-size: 11px; color: var(--sand); cursor: pointer; font-family: 'DM Sans'; text-decoration: none; }
.panel-link:hover { color: var(--sand-dk); text-decoration: none; }
.panel-link-btn { font-size: 11px; color: var(--sand); cursor: pointer; font-family: 'DM Sans'; background: none; border: none; padding: 0; }

/* ── Hero bar ─────────────────────────────────────────────────────────────── */
.hero        { background: var(--cream); border-radius: var(--r-card); padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hero-left   { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.hero-icon   { width: 44px; height: 44px; background: var(--linen); border-radius: var(--r-card); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-photo  { width: 72px; height: 72px; background: var(--linen); border-radius: var(--r-card); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-name   { font-size: 16px; font-weight: 500; color: var(--espresso); font-family: 'DM Sans'; }
.hero-meta   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.hero-tag    { font-size: 10px; background: var(--linen); color: var(--sand-dk); border-radius: 5px; padding: 2px 7px; font-family: 'DM Sans'; }
.hero-text   { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }

/* ── Location trail ───────────────────────────────────────────────────────── */
.trail      { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.trail-node { background: white; border: 0.5px solid var(--sand); border-radius: var(--r-sm); padding: 4px 10px; font-size: 11px; color: var(--sand-dk); font-weight: 500; font-family: 'DM Sans'; }
.trail-sep  { color: var(--sand); font-size: 12px; }

/* ── Grid layouts ─────────────────────────────────────────────────────────── */
.two-col    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.layout-main-side { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }

/* ── Info rows ────────────────────────────────────────────────────────────── */
.info-row          { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 0.5px solid var(--linen); }
.info-row:last-child { border-bottom: none; }
.info-key          { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }
.info-val          { font-size: 12px; color: var(--espresso); font-weight: 500; font-family: 'DM Sans'; text-align: right; }
.info-val.muted    { color: #B4A898; font-weight: 400; font-style: italic; }

/* ── QR mini panel ────────────────────────────────────────────────────────── */
.qr-mini       { background: white; border: var(--border); border-radius: var(--r-card); padding: 12px; display: flex; align-items: center; gap: 10px; }
.qr-mini-left  { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.qr-chip       { background: var(--espresso); border-radius: 3px; padding: 2px 6px; font-size: 8px; color: var(--sand); font-weight: 500; letter-spacing: 0.3px; font-family: 'DM Sans'; }
.qr-mini-right { flex: 1; min-width: 0; }
.qr-url        { font-size: 10px; color: #B4A898; word-break: break-all; margin-bottom: 8px; font-family: 'DM Sans'; }
.qr-actions    { display: flex; flex-direction: column; gap: 5px; }
.qr-btn        { background: var(--cream); border: var(--border); border-radius: var(--r-sm); padding: 5px 8px; font-size: 11px; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; gap: 5px; }
.qr-btn.primary { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }

/* ── Container cards (grid list) ─────────────────────────────────────────── */
.container-card { background: var(--cream); border-radius: var(--r-card); padding: 14px; cursor: pointer; border: 0.5px solid transparent; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.15s, background 0.15s; text-decoration: none; }
.container-card:hover { border-color: var(--sand); background: var(--sand-lt); text-decoration: none; }
.card-icon      { width: 34px; height: 34px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-name      { font-size: 13px; font-weight: 500; color: var(--espresso); margin-bottom: 2px; font-family: 'DM Sans'; }
.card-type      { font-size: 10px; background: var(--linen); color: var(--sand-dk); border-radius: var(--r-xs); padding: 2px 6px; display: inline-block; font-family: 'DM Sans'; }
.card-path      { font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 4px; margin-top: 2px; font-family: 'DM Sans'; }
.card-stats     { display: flex; gap: 10px; align-items: center; }
.card-stat      { font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 4px; font-family: 'DM Sans'; }
.card-stat-num  { font-size: 13px; font-weight: 500; color: var(--espresso); }
.card-footer    { display: flex; align-items: center; justify-content: space-between; }
.card-date      { font-size: 10px; color: #B4A898; font-family: 'DM Sans'; }
.card-actions   { display: flex; gap: 5px; opacity: 0; }
.container-card:hover .card-actions { opacity: 1; }
.card-btn       { background: white; border: var(--border); border-radius: var(--r-xs); padding: 4px 8px; font-size: 10px; color: var(--oak); cursor: pointer; white-space: nowrap; font-family: 'DM Sans'; }

/* ── Items table (lighter) ────────────────────────────────────────────────── */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { font-size: 10px; font-weight: 500; color: var(--oak); text-align: left; padding: 0 10px 8px; border-bottom: var(--border); white-space: nowrap; font-family: 'DM Sans'; }
.items-table td { font-size: 12px; color: var(--espresso); padding: 9px 10px; border-bottom: 0.5px solid var(--cream); vertical-align: middle; font-family: 'DM Sans'; }
.items-table tr:last-child td { border-bottom: none; }
.items-table tr:hover td { background: var(--sand-lt); }
.item-dot       { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.item-name-cell { display: flex; align-items: center; gap: 8px; }
.action-cell    { display: flex; gap: 4px; opacity: 0; }
.items-table tr:hover .action-cell { opacity: 1; }
.action-btn     { background: var(--cream); border: var(--border); border-radius: var(--r-xs); padding: 4px 7px; font-size: 10px; color: var(--oak); cursor: pointer; white-space: nowrap; font-family: 'DM Sans'; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.page-info  { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }
.page-btns  { display: flex; gap: 4px; }
.page-btn   { width: 28px; height: 28px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--oak); cursor: pointer; background: var(--cream); border: var(--border); font-family: 'DM Sans'; }
.page-btn.active { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }

/* ── Filter row ───────────────────────────────────────────────────────────── */
.filter-row      { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-label-sm { font-size: 11px; color: var(--oak); flex-shrink: 0; font-family: 'DM Sans'; }
.filter-chip     { font-size: 11px; padding: 4px 11px; border-radius: var(--r-pill); cursor: pointer; border: var(--border); background: var(--cream); color: var(--oak); white-space: nowrap; font-family: 'DM Sans'; }
.filter-chip.active     { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.filter-chip.active-alt { background: var(--linen); border-color: var(--linen); color: var(--sand-dk); }
.filter-divider  { width: 1px; height: 16px; background: var(--linen); flex-shrink: 0; }

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.toolbar      { display: flex; align-items: center; gap: 8px; }
.search-box-sm { display: flex; align-items: center; gap: 7px; background: var(--cream); border: var(--border); border-radius: var(--r-md); padding: 7px 11px; flex: 1; font-size: 12px; color: #B4A898; font-family: 'DM Sans'; }
.sort-select  { display: flex; align-items: center; gap: 5px; background: var(--cream); border: var(--border); border-radius: var(--r-nav); padding: 7px 10px; font-size: 11px; color: var(--oak); cursor: pointer; white-space: nowrap; font-family: 'DM Sans'; }
.results-meta { display: flex; align-items: center; justify-content: space-between; }
.results-count { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }

/* ── Bulk action bar ──────────────────────────────────────────────────────── */
.bulk-bar   { background: var(--espresso); border-radius: var(--r-md); padding: 9px 14px; display: flex; align-items: center; gap: 10px; }
.bulk-count { font-size: 12px; font-weight: 500; color: var(--cream); flex: 1; font-family: 'DM Sans'; }
.bulk-btn   { background: rgba(245,241,236,0.1); border: 0.5px solid rgba(245,241,236,0.2); border-radius: var(--r-sm); padding: 5px 12px; font-size: 11px; color: var(--cream); cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; gap: 5px; }
.bulk-btn.danger { border-color: rgba(240,149,149,0.4); color: #F09595; }

/* ── Search results ───────────────────────────────────────────────────────── */
.result-card  { background: var(--cream); border-radius: var(--r-card); padding: 11px 14px; margin-bottom: 7px; display: flex; align-items: center; gap: 12px; cursor: pointer; border: 0.5px solid transparent; transition: border-color 0.15s, background 0.15s; text-decoration: none; }
.result-card:hover { border-color: var(--sand); background: var(--sand-lt); text-decoration: none; }
.result-icon  { width: 32px; height: 32px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.result-main  { flex: 1; min-width: 0; }
.result-name  { font-size: 13px; font-weight: 500; color: var(--espresso); font-family: 'DM Sans'; }
.result-name mark { background: var(--sand-lt); color: var(--sand); font-weight: 500; border-radius: 2px; padding: 0 1px; }
.result-path  { font-size: 11px; color: var(--oak); margin-top: 2px; display: flex; align-items: center; gap: 4px; font-family: 'DM Sans'; }
.result-tag   { font-size: 10px; background: var(--linen); color: var(--sand-dk); border-radius: var(--r-xs); padding: 2px 7px; flex-shrink: 0; font-family: 'DM Sans'; }
.result-tag.green { background: var(--sage-lt); color: #2B6B4A; }
.section-count { background: var(--linen); color: var(--sand-dk); border-radius: 10px; padding: 1px 7px; font-size: 10px; font-family: 'DM Sans'; }
.tab-row   { display: flex; gap: 4px; margin-bottom: 14px; }
.tab-btn   { font-size: 12px; padding: 5px 12px; border-radius: var(--r-pill); cursor: pointer; color: var(--oak); background: var(--cream); border: var(--border); font-family: 'DM Sans'; }
.tab-btn.active { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.search-full-wrap { display: flex; align-items: center; gap: 8px; background: white; border: 0.5px solid var(--sand); border-radius: var(--r-md); padding: 8px 12px; flex: 1; }

/* ── Activity log ─────────────────────────────────────────────────────────── */
.day-group    { margin-bottom: 20px; }
.day-label    { font-size: 11px; font-weight: 500; color: var(--oak); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-family: 'DM Sans'; }
.day-line     { flex: 1; height: 0.5px; background: var(--linen); }
.event-row    { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.event-timeline { display: flex; flex-direction: column; align-items: center; padding-top: 3px; flex-shrink: 0; width: 22px; }
.event-connector { width: 1px; flex: 1; background: var(--linen); min-height: 12px; margin-top: 3px; }
.event-card   { flex: 1; background: var(--cream); border-radius: var(--r-row); padding: 9px 12px; min-width: 0; }
.event-top    { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.event-text   { font-size: 12px; color: var(--espresso); line-height: 1.5; flex: 1; font-family: 'DM Sans'; }
.event-text strong { font-weight: 500; }
.event-time   { font-size: 10px; color: #B4A898; white-space: nowrap; flex-shrink: 0; font-family: 'DM Sans'; }
.event-meta   { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.event-user   { font-size: 10px; color: var(--oak); display: flex; align-items: center; gap: 4px; font-family: 'DM Sans'; }
.user-avatar-sm { width: 14px; height: 14px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 500; color: var(--sand-dk); }
.event-path   { font-size: 10px; color: #B4A898; display: flex; align-items: center; gap: 3px; font-family: 'DM Sans'; }
.event-badge  { font-size: 9px; border-radius: var(--r-xs); padding: 1px 6px; font-family: 'DM Sans'; }
.badge-add    { background: var(--sage-lt);   color: #2B6B4A; }
.badge-edit   { background: var(--sand-lt);   color: var(--sand-dk); }
.badge-move   { background: var(--violet-lt); color: #3C3489; }
.badge-scan   { background: var(--blue-lt);   color: #0C447C; }
.badge-del    { background: var(--danger-lt); color: var(--danger); }
.badge-create { background: #E1F5EE;          color: #085041; }
.filter-panel-box   { background: var(--cream); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 10px; }
.filter-panel-title { font-size: 11px; font-weight: 500; color: var(--espresso); margin-bottom: 10px; font-family: 'DM Sans'; }
.filter-option      { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; cursor: pointer; }
.filter-option-label { font-size: 12px; color: var(--espresso); display: flex; align-items: center; gap: 6px; font-family: 'DM Sans'; }
.filter-count-sm    { font-size: 10px; color: #B4A898; font-family: 'DM Sans'; }
.filter-check    { width: 14px; height: 14px; border-radius: 3px; border: var(--border); background: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.filter-check.checked { background: var(--sand); border-color: var(--sand); }
.export-btn { display: flex; align-items: center; gap: 5px; background: var(--cream); border: var(--border); border-radius: var(--r-nav); padding: 5px 10px; font-size: 11px; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; }

/* ── Settings layout ──────────────────────────────────────────────────────── */
.settings-layout     { display: flex; margin: -20px -24px; min-height: calc(100vh - 56px); }
.settings-nav        { width: 170px; background: var(--cream); border-right: var(--border); padding: 16px 10px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-nav-section { font-size: 9px; color: #B4A898; text-transform: uppercase; letter-spacing: 0.6px; padding: 10px 8px 4px; font-family: 'DM Sans'; }
.settings-nav-item   { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-nav); cursor: pointer; font-size: 12px; color: var(--oak); font-family: 'DM Sans'; text-decoration: none; }
.settings-nav-item:hover  { background: white; color: var(--espresso); text-decoration: none; }
.settings-nav-item.active { background: white; color: var(--espresso); font-weight: 500; border: var(--border); }
.settings-content    { flex: 1; padding: 20px 24px; background: white; overflow-y: auto; }
.settings-page-title { font-size: 16px; font-weight: 500; color: var(--espresso); margin-bottom: 4px; font-family: 'DM Sans'; }
.settings-page-sub   { font-size: 12px; color: var(--oak); margin-bottom: 24px; font-family: 'DM Sans'; }
.settings-section    { margin-bottom: 24px; }
.section-title       { font-size: 12px; font-weight: 500; color: var(--espresso); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 0.5px solid var(--cream); font-family: 'DM Sans'; }
.setting-row         { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--cream); gap: 16px; }
.setting-row:last-child { border-bottom: none; }
.setting-left        { flex: 1; }
.setting-label       { font-size: 13px; color: var(--espresso); font-weight: 500; margin-bottom: 2px; font-family: 'DM Sans'; }
.setting-desc        { font-size: 11px; color: var(--oak); line-height: 1.5; font-family: 'DM Sans'; }

/* ── Room card (dashboard) ────────────────────────────────────────────────── */
.room-card      { background: white; border-radius: var(--r-card); padding: 12px; border: var(--border); cursor: pointer; transition: border-color 0.15s; text-decoration: none; display: block; }
.room-card:hover { border-color: var(--sand); text-decoration: none; }
.room-card-icon { font-size: 1.2rem; width: 30px; height: 30px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.room-card-name { font-size: 13px; font-weight: 500; color: var(--espresso); font-family: 'DM Sans'; }
.room-card-meta { font-size: 11px; color: var(--oak); margin-top: 2px; font-family: 'DM Sans'; }

/* ── Recent item list (dashboard) ────────────────────────────────────────── */
.item-list     { display: flex; flex-direction: column; gap: 6px; }
.item-row      { display: flex; align-items: center; gap: 10px; background: white; border-radius: var(--r-md); padding: 9px 12px; border: var(--border); }
.item-info     { flex: 1; min-width: 0; }
.item-row-name { font-size: 13px; font-weight: 500; color: var(--espresso); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'DM Sans'; }
.item-row-loc  { font-size: 11px; color: var(--oak); margin-top: 1px; font-family: 'DM Sans'; }

/* ── Item detail: location & history ─────────────────────────────────────── */
.loc-trail     { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.loc-step      { display: flex; align-items: center; gap: 10px; }
.loc-icon      { width: 28px; height: 28px; background: white; border: var(--border); border-radius: var(--r-nav); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.loc-step-label { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }
.loc-step-val  { font-size: 12px; font-weight: 500; color: var(--espresso); font-family: 'DM Sans'; }
.loc-connector { width: 1px; height: 10px; background: var(--linen); margin-left: 13px; }
.history-list  { display: flex; flex-direction: column; gap: 8px; }
.history-row   { display: flex; align-items: flex-start; gap: 8px; }
.history-dot-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 3px; }
.history-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); flex-shrink: 0; }
.history-dot.green { background: var(--sage); }
.history-line  { width: 1px; height: 18px; background: var(--linen); }
.history-text  { font-size: 12px; color: var(--espresso); font-family: 'DM Sans'; }
.history-date  { font-size: 10px; color: #B4A898; margin-top: 2px; font-family: 'DM Sans'; }
.photo-placeholder { background: var(--linen); border-radius: var(--r-md); height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 0.5px dashed var(--sand); }
.photo-label   { font-size: 11px; color: var(--oak); font-family: 'DM Sans'; }
.photo-sub     { font-size: 10px; color: #B4A898; font-family: 'DM Sans'; }
.move-to-btn   { width: 100%; background: white; border: var(--border); border-radius: var(--r-md); padding: 8px; font-size: 12px; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }

/* ── Add item wizard ──────────────────────────────────────────────────────── */
.wizard-steps  { display: flex; align-items: center; margin-bottom: 28px; }
.wz-step       { display: flex; align-items: center; gap: 8px; }
.wz-circle     { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; transition: background 0.2s; }
.wz-circle.done   { background: var(--sage); color: white; }
.wz-circle.active { background: var(--sand); color: var(--sand-dk); }
.wz-circle.idle   { background: var(--linen); color: var(--oak); }
.wz-label      { font-size: 12px; color: var(--oak); white-space: nowrap; }
.wz-label.active { color: var(--espresso); font-weight: 500; }
.wz-line       { flex: 1; height: 1px; background: var(--linen); margin: 0 10px; min-width: 20px; }
.wz-line.done  { background: var(--sage); }
.ai-two-col    { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; }
.ai-form-panel { background: var(--cream); border-radius: var(--r-lg); padding: 20px; }
.ai-panel-title { font-size: 14px; font-weight: 500; color: var(--espresso); margin-bottom: 16px; }
.ai-field      { margin-bottom: 14px; }
.ai-field-label { font-size: 11px; font-weight: 500; color: var(--oak); margin-bottom: 5px; letter-spacing: 0.3px; display: block; }
.ai-field-required { color: var(--terra); margin-left: 2px; }
.ai-field-display { width: 100%; background: var(--sand-lt); border: var(--border-active); border-radius: var(--r-md); padding: 9px 12px; font-size: 13px; color: var(--espresso); font-family: 'DM Sans'; }
.ai-field-display.empty { border-color: var(--linen); background: white; color: #B4A898; font-style: italic; }
.tag-chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip      { font-size: 12px; padding: 5px 12px; border-radius: var(--r-pill); border: var(--border); background: white; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; transition: all 0.15s; }
.tag-chip:hover { border-color: var(--sand); color: var(--sand-dk); }
.tag-chip.selected { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.ai-photo-box  { background: white; border: 0.5px dashed var(--sand); border-radius: var(--r-card); padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.ai-photo-box:hover { background: var(--sand-lt); }
.ai-photo-box-icon { width: 36px; height: 36px; background: var(--linen); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ai-loc-panel  { background: var(--cream); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ai-loc-step   { background: white; border-radius: var(--r-card); border: var(--border); overflow: hidden; }
.ai-loc-header { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.ai-loc-num    { width: 20px; height: 20px; border-radius: 50%; background: var(--sand); color: var(--sand-dk); font-size: 11px; font-weight: 500; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-loc-num.idle { background: var(--linen); color: var(--oak); }
.ai-loc-title  { font-size: 13px; font-weight: 500; color: var(--espresso); flex: 1; }
.ai-loc-title.idle { color: var(--oak); font-weight: 400; }
.ai-loc-value  { font-size: 12px; color: var(--sand); }
.ai-loc-options { padding: 0 14px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-loc-opt    { font-size: 12px; padding: 5px 11px; border-radius: var(--r-nav); border: var(--border); background: var(--cream); color: var(--oak); cursor: pointer; font-family: 'DM Sans'; }
.ai-loc-opt:hover { border-color: var(--sand); }
.ai-loc-opt.selected { background: var(--sand-lt); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.ai-review-panel { background: var(--cream); border-radius: var(--r-lg); padding: 20px; }
.ai-review-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: var(--border); }
.ai-review-row:last-child { border-bottom: none; }
.ai-review-key { font-size: 11px; color: var(--oak); }
.ai-review-val { font-size: 12px; color: var(--espresso); font-weight: 500; text-align: right; max-width: 60%; }
.ai-footer     { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: var(--border); }

/* ── Room cards (Rooms index) ─────────────────────────────────────────────── */
.rooms-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.room-card     { background: var(--cream); border-radius: var(--r-lg); overflow: hidden; border: 0.5px solid transparent; cursor: pointer; transition: border-color 0.15s; display: flex; flex-direction: column; text-decoration: none; }
.room-card:hover { border-color: var(--sand); text-decoration: none; }
.room-card:hover .room-card-actions { opacity: 1; }
.room-hero     { height: 80px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.room-hero.hero-living  { background: linear-gradient(135deg, #E8DDD0 0%, #D4C5B0 100%); }
.room-hero.hero-bedroom { background: linear-gradient(135deg, #D6EDE3 0%, #B8D9CC 100%); }
.room-hero.hero-kitchen { background: linear-gradient(135deg, #FAE8DC 0%, #EDD0C0 100%); }
.room-hero.hero-garage  { background: linear-gradient(135deg, #EEEDFE 0%, #D8D5F8 100%); }
.room-hero.hero-office  { background: linear-gradient(135deg, #E6F1FB 0%, #C8DDF0 100%); }
.room-hero.hero-default { background: linear-gradient(135deg, #F5F1EC 0%, #E8DDD0 100%); }
.room-icon-bg  { width: 44px; height: 44px; border-radius: var(--r-lg); background: rgba(255,255,255,0.65); display: flex; align-items: center; justify-content: center; }
.room-card-body { padding: 12px 14px; flex: 1; }
.room-name     { font-size: 14px; font-weight: 600; color: var(--espresso); margin-bottom: 4px; font-family: 'DM Sans'; }
.room-meta     { font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.room-dot      { width: 3px; height: 3px; border-radius: 50%; background: var(--linen); }
.room-containers { display: flex; flex-direction: column; gap: 5px; }
.container-pill { display: flex; align-items: center; gap: 7px; background: white; border-radius: var(--r-nav); padding: 6px 9px; }
.container-pill-icon  { width: 20px; height: 20px; background: var(--linen); border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.container-pill-name  { font-size: 11px; font-weight: 500; color: var(--espresso); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.container-pill-count { font-size: 10px; color: #B4A898; flex-shrink: 0; }
.container-pill-more  { font-size: 11px; color: var(--sand); font-weight: 500; padding: 4px 9px; }
.room-card-footer { padding: 10px 14px 12px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.room-card-date    { font-size: 10px; color: #B4A898; }
.room-card-actions { display: flex; gap: 5px; opacity: 0; transition: opacity 0.15s; }
.room-action-btn   { font-size: 10px; color: var(--oak); background: white; border: var(--border); border-radius: 5px; padding: 3px 8px; cursor: pointer; font-family: 'DM Sans'; }
.room-card-add     { background: var(--cream); border-radius: var(--r-lg); border: 0.5px dashed var(--linen); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 20px; min-height: 220px; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.room-card-add:hover { border-color: var(--sand); background: var(--sand-lt); text-decoration: none; }
.room-add-icon     { width: 40px; height: 40px; border-radius: 50%; background: white; border: var(--border); display: flex; align-items: center; justify-content: center; }
.room-add-label    { font-size: 13px; font-weight: 500; color: var(--oak); }
.room-add-sub      { font-size: 11px; color: #B4A898; text-align: center; line-height: 1.5; }

/* ── Move item page ───────────────────────────────────────────────────────── */
.move-layout   { display: flex; flex-direction: column; height: 100%; gap: 0; }
.move-content  { flex: 1; display: flex; gap: 16px; overflow: auto; }
.move-left     { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.move-right    { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.move-footer   { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; border-top: var(--border); margin-top: 4px; }
.move-item-banner { background: var(--cream); border-radius: var(--r-card); padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.move-item-icon { width: 36px; height: 36px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.move-item-name { font-size: 14px; font-weight: 500; color: var(--espresso); margin-bottom: 3px; }
.move-item-meta { font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 5px; }
.move-panel    { background: var(--cream); border-radius: var(--r-card); padding: 14px; }
.move-panel-title { font-size: 12px; font-weight: 500; color: var(--espresso); margin-bottom: 12px; }
.move-from-trail { display: flex; align-items: center; gap: 8px; background: white; border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 12px; }
.move-arrow    { display: flex; justify-content: center; margin: 4px 0; }
.move-to-label { font-size: 10px; font-weight: 500; color: var(--oak); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.move-room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.move-room-opt { background: white; border: var(--border); border-radius: var(--r-md); padding: 9px 10px; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.move-room-opt:hover { border-color: var(--sand); }
.move-room-opt.selected { border-color: var(--sand); background: var(--sand-lt); }
.move-room-opt.current  { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.move-room-opt-name { font-size: 12px; font-weight: 500; color: var(--espresso); }
.move-room-opt.selected .move-room-opt-name { color: var(--sand-dk); }
.move-container-list { display: flex; flex-direction: column; gap: 6px; }
.move-container-opt { background: white; border: var(--border); border-radius: var(--r-md); padding: 9px 12px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.move-container-opt:hover { border-color: var(--sand); }
.move-container-opt.selected { border-color: var(--sand); background: var(--sand-lt); }
.move-c-icon  { width: 26px; height: 26px; background: var(--linen); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.move-container-opt.selected .move-c-icon { background: #F5EDE0; }
.move-c-name  { font-size: 12px; font-weight: 500; color: var(--espresso); flex: 1; }
.move-container-opt.selected .move-c-name { color: var(--sand-dk); }
.move-c-count { font-size: 10px; color: var(--oak); }
.move-c-radio { width: 14px; height: 14px; border-radius: 50%; border: var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.move-c-radio.checked { border-color: var(--sand); }
.move-c-radio-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.move-preview-panel { background: var(--cream); border-radius: var(--r-card); padding: 14px; }
.move-preview-title { font-size: 11px; font-weight: 500; color: var(--oak); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.move-preview-label { font-size: 10px; color: #B4A898; margin-bottom: 4px; }
.move-preview-trail { display: flex; flex-direction: column; gap: 4px; }
.move-preview-node  { background: white; border: var(--border); border-radius: var(--r-sm); padding: 5px 9px; font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 6px; }
.move-preview-node.active { border-color: var(--sand); color: var(--sand-dk); background: var(--sand-lt); }
.move-preview-connector { width: 1px; height: 10px; background: var(--linen); margin-left: 12px; }
.move-preview-divider { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.move-history-note { background: white; border-radius: var(--r-md); padding: 9px 12px; font-size: 11px; color: var(--oak); line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.btn-move { background: var(--violet); border: none; border-radius: var(--r-md); padding: 8px 20px; font-size: 12px; font-weight: 500; color: #EEEDFE; cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; gap: 6px; }
.btn-move:hover { opacity: 0.9; }
.btn-move:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Notifications page ───────────────────────────────────────────────────── */
.notif-layout      { display: flex; height: 100%; margin: -20px -24px; min-height: calc(100vh - 56px); }
.notif-list-col    { width: 290px; flex-shrink: 0; border-right: var(--border); display: flex; flex-direction: column; background: white; }
.notif-header      { padding: 12px 16px; border-bottom: var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-title       { font-size: 14px; font-weight: 500; color: var(--espresso); }
.notif-unread-ct   { font-size: 11px; color: #B4A898; margin-left: 4px; }
.notif-mark-all    { font-size: 11px; color: var(--sand); cursor: pointer; }
.notif-mark-all:hover { text-decoration: underline; }
.notif-filter-tabs { display: flex; padding: 8px 12px; gap: 4px; border-bottom: 0.5px solid #F5F1EC; }
.notif-ftab        { font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill); cursor: pointer; color: var(--oak); background: var(--cream); border: var(--border); }
.notif-ftab.active { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.notif-scroll      { flex: 1; overflow-y: auto; }
.notif-day-label   { font-size: 10px; font-weight: 500; color: #B4A898; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 16px 4px; }
.notif-row         { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; cursor: pointer; border-bottom: 0.5px solid #F5F1EC; position: relative; }
.notif-row:hover   { background: var(--cream); }
.notif-row.unread  { background: #FDFAF6; }
.notif-row.unread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sand); }
.notif-row.selected { background: var(--sand-lt); border-left: 3px solid var(--sand); }
.notif-avatar      { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.notif-icon-wrap   { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-body        { flex: 1; min-width: 0; }
.notif-text        { font-size: 12px; color: var(--espresso); line-height: 1.5; margin-bottom: 3px; }
.notif-text strong { font-weight: 500; }
.notif-time        { font-size: 10px; color: #B4A898; }
.notif-unread-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); flex-shrink: 0; margin-top: 5px; }
.notif-detail-col  { flex: 1; display: flex; flex-direction: column; background: white; }
.notif-detail-header { padding: 12px 20px; border-bottom: var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-detail-title { font-size: 14px; font-weight: 500; color: var(--espresso); }
.notif-detail-time  { font-size: 11px; color: #B4A898; }
.notif-detail-body  { flex: 1; padding: 20px; overflow-y: auto; }
.notif-detail-card  { background: var(--cream); border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 14px; }
.notif-detail-nh   { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.notif-detail-av   { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; flex-shrink: 0; }
.notif-detail-name { font-size: 14px; font-weight: 500; color: var(--espresso); margin-bottom: 2px; }
.notif-detail-sub  { font-size: 11px; color: var(--oak); }
.notif-detail-msg  { font-size: 13px; color: var(--espresso); line-height: 1.7; }
.notif-detail-ctx  { background: white; border-radius: var(--r-row); padding: 11px 14px; margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.notif-ctx-icon    { width: 28px; height: 28px; background: var(--linen); border-radius: var(--r-nav); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-ctx-name    { font-size: 12px; font-weight: 500; color: var(--espresso); }
.notif-ctx-meta    { font-size: 10px; color: var(--oak); margin-top: 2px; }
.notif-detail-hint { font-size: 11px; color: var(--oak); margin-bottom: 14px; line-height: 1.6; }
.notif-detail-actions { display: flex; gap: 8px; }
.notif-empty       { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--oak); gap: 8px; }
.notif-empty-icon  { font-size: 32px; }
.notif-empty-text  { font-size: 13px; }

/* ── QR scan landing page ─────────────────────────────────────────────────── */
.qr-gate-content   { flex: 1; background: white; display: flex; align-items: center; justify-content: center; padding: 24px; }
.qr-gate-card      { background: var(--cream); border-radius: var(--r-modal); padding: 28px 32px; width: 380px; display: flex; flex-direction: column; align-items: center; }
.qr-gate-icon      { width: 52px; height: 52px; background: var(--linen); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.qr-gate-title     { font-size: 16px; font-weight: 500; color: var(--espresso); text-align: center; margin-bottom: 6px; }
.qr-gate-sub       { font-size: 12px; color: var(--oak); text-align: center; line-height: 1.6; margin-bottom: 20px; }
.qr-gate-container-row { background: white; border-radius: var(--r-card); padding: 12px 14px; width: 100%; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; border: var(--border); }
.qr-gate-c-icon    { width: 34px; height: 34px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qr-gate-c-name    { font-size: 13px; font-weight: 500; color: var(--espresso); }
.qr-gate-c-meta    { font-size: 11px; color: var(--oak); margin-top: 2px; }
.qr-gate-divider   { width: 100%; height: 0.5px; background: var(--linen); margin-bottom: 20px; }
.qr-gate-btn-primary { width: 100%; background: var(--sand); border: none; border-radius: var(--r-row); padding: 11px; font-size: 13px; font-weight: 500; color: var(--sand-dk); cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 10px; }
.qr-gate-btn-secondary { width: 100%; background: transparent; border: var(--border); border-radius: var(--r-row); padding: 10px; font-size: 13px; color: var(--oak); cursor: pointer; font-family: 'DM Sans'; display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 14px; }
.qr-gate-link      { font-size: 11px; color: #B4A898; text-align: center; line-height: 1.6; }
.qr-gate-link span { color: var(--sand); cursor: pointer; }
.qr-verified-badge { display: flex; align-items: center; gap: 5px; background: var(--sage-lt); border-radius: var(--r-sm); padding: 4px 10px; }
.qr-verified-label { font-size: 11px; color: #2B6B4A; font-weight: 500; }

/* ── Blazor plumbing ──────────────────────────────────────────────────────── */
.valid.modified:not([type=checkbox]) { outline: 0.5px solid var(--sage); }
.invalid { outline: 0.5px solid var(--danger); }
.validation-message { font-size: 11px; color: var(--danger); margin-top: 3px; }

.blazor-error-boundary {
    background: var(--danger-lt);
    border: var(--border-danger);
    border-radius: var(--r-card);
    padding: 12px 16px;
    color: var(--danger);
    font-size: 13px;
}
.blazor-error-boundary::after { content: "An unexpected error has occurred."; }

#blazor-error-ui {
    color-scheme: light only;
    background: #FFF8EE;
    border-top: 0.5px solid var(--linen);
    bottom: 0; left: 0;
    display: none;
    padding: 8px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 12px;
    font-family: 'DM Sans';
    color: var(--espresso);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 8px; }

/* ── Room Detail ──────────────────────────────────────────── */
.rd-hero            { background: var(--cream); border-radius: var(--r-lg); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.rd-hero-left       { display: flex; align-items: center; gap: 14px; }
.rd-hero-icon       { width: 52px; height: 52px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rd-hero-name       { font-size: 18px; font-weight: 500; color: var(--espresso); }
.rd-hero-sub        { font-size: 12px; color: var(--oak); margin-top: 3px; }
.rd-stats           { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.rd-stat-pill       { background: white; border: var(--border); border-radius: var(--r-md); padding: 10px 14px; text-align: center; }
.rd-stat-num        { font-size: 22px; font-weight: 500; color: var(--espresso); }
.rd-stat-lbl        { font-size: 11px; color: var(--oak); margin-top: 2px; }
.rd-two-col         { display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px; }
.rd-panel           { background: var(--cream); border-radius: var(--r-lg); padding: 16px; }
.rd-panel-header    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rd-panel-title     { font-size: 13px; font-weight: 500; color: var(--espresso); }
.rd-panel-link      { font-size: 11px; color: var(--sand); cursor: pointer; background: none; border: none; padding: 0; text-decoration: none; }
.rd-panel-link:hover { text-decoration: underline; }
.rd-container-list  { display: flex; flex-direction: column; gap: 8px; }
.rd-container-card  { background: white; border-radius: var(--r-md); border: var(--border); padding: 11px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: border-color 0.12s, background 0.12s; }
.rd-container-card:hover { border-color: var(--sand); }
.rd-container-card.selected { border-color: var(--sand); background: #FDF8F2; }
.rd-container-icon  { width: 28px; height: 28px; background: var(--linen); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rd-container-name  { font-size: 13px; font-weight: 500; color: var(--espresso); flex: 1; }
.rd-container-count { font-size: 11px; color: var(--oak); white-space: nowrap; }
.rd-item-table      { width: 100%; border-collapse: collapse; }
.rd-item-table th   { font-size: 11px; color: var(--oak); font-weight: 500; text-align: left; padding: 0 10px 8px; border-bottom: var(--border); }
.rd-item-table td   { font-size: 13px; color: var(--espresso); padding: 9px 10px; border-bottom: 0.5px solid var(--cream); vertical-align: middle; }
.rd-item-table tr:last-child td { border-bottom: none; }
.rd-item-dot        { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); display: inline-block; margin-right: 6px; }
.rd-tag             { font-size: 10px; background: var(--linen); color: #6B4F2A; border-radius: 5px; padding: 2px 7px; display: inline-block; }

/* ── Items list ───────────────────────────────────────────── */
.il-sort-select     { display: flex; align-items: center; gap: 5px; background: var(--cream); border: 0.5px solid var(--linen); border-radius: 7px; padding: 7px 10px; font-size: 11px; color: var(--oak); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.il-select-all      { font-size: 11px; color: var(--sand); cursor: pointer; background: none; border: none; padding: 0; }
.il-select-all:hover { text-decoration: underline; }
.il-cb              { width: 14px; height: 14px; border-radius: 3px; border: 0.5px solid var(--linen); background: white; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.il-cb.checked      { background: var(--sand); border-color: var(--sand); }
.il-bulk-bar        { background: var(--espresso); border-radius: 8px; padding: 9px 14px; display: flex; align-items: center; gap: 10px; }
.il-bulk-count      { font-size: 12px; font-weight: 500; color: #F5F1EC; flex: 1; }
.il-bulk-btn        { background: rgba(245,241,236,0.1); border: 0.5px solid rgba(245,241,236,0.2); border-radius: 6px; padding: 5px 12px; font-size: 11px; color: #F5F1EC; cursor: pointer; display: flex; align-items: center; gap: 5px; font-family: 'DM Sans', sans-serif; }
.il-bulk-danger     { border-color: rgba(240,149,149,0.4); color: #F09595; }
.il-date-cell       { font-size: 11px; color: #B4A898; white-space: nowrap; }
.tag-neutral        { background: var(--linen);    color: var(--sand-dk); }
.tag-sage           { background: var(--sage-lt);  color: #2B6B4A; }
.tag-terra          { background: var(--terra-lt); color: #7A3A18; }
.tag-blue           { background: var(--blue-lt);  color: #0C447C; }
.path-cell          { font-size: 11px; color: var(--oak); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.item-name          { font-size: 12px; font-weight: 500; color: var(--espresso); }

/* ── Add item wizard extras ───────────────────────────────── */
.ai-field-divider  { font-size: 11px; font-weight: 500; color: var(--oak); text-transform: uppercase; letter-spacing: 0.5px; margin: 20px 0 14px; display: flex; align-items: center; gap: 8px; }
.ai-field-divider::after { content: ''; flex: 1; height: 0.5px; background: var(--linen); }
.ai-field-optional { font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #B4A898; }

/* ── QR panel (container detail) ──────────────────────────── */
.qr-preview-card    { background: white; border: var(--border); border-radius: var(--r-md); padding: 14px 12px; display: flex; align-items: flex-start; gap: 14px; }
.qr-preview-left    { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.qr-label-chip      { background: var(--espresso); border-radius: 4px; padding: 2px 7px; font-size: 9px; color: var(--sand); font-weight: 500; letter-spacing: 0.3px; }
.qr-preview-name    { font-size: 10px; font-weight: 500; color: var(--espresso); text-align: center; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-preview-meta    { font-size: 9px; color: var(--oak); text-align: center; }
.qr-preview-right   { flex: 1; min-width: 0; }
.qr-action-btn      { display: flex; align-items: center; gap: 5px; background: var(--cream); border: var(--border); border-radius: 7px; padding: 5px 10px; font-size: 11px; color: var(--oak); cursor: pointer; font-family: 'DM Sans', sans-serif; text-decoration: none; width: 100%; }
.qr-action-btn.primary { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.qr-action-btn:hover { opacity: 0.85; }
.qr-style-opt       { background: white; border: var(--border); border-radius: var(--r-md); padding: 9px 12px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: border-color 0.12s, background 0.12s; }
.qr-style-opt:hover { border-color: var(--sand); }
.qr-style-opt.selected { border-color: var(--sand); background: #FDF8F2; }
.qr-radio           { width: 15px; height: 15px; border-radius: 50%; border: 0.5px solid var(--linen); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.qr-radio.checked   { border-color: var(--sand); }
.qr-radio-dot       { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }

/* ── QR scan page (/c/{token}) ────────────────────────────────────────────── */
.qs-gate-content    { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; min-height: calc(100vh - 48px); background: white; }
.qs-gate-card       { background: var(--cream); border-radius: var(--r-modal); padding: 28px 32px; width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.qs-gate-icon       { width: 52px; height: 52px; background: var(--linen); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.qs-gate-title      { font-size: 16px; font-weight: 500; color: var(--espresso); text-align: center; margin-bottom: 6px; }
.qs-gate-sub        { font-size: 12px; color: var(--oak); text-align: center; line-height: 1.6; margin-bottom: 20px; }
.qs-container-row   { background: white; border-radius: var(--r-card); padding: 12px 14px; width: 100%; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; border: var(--border); }
.qs-container-icon  { width: 34px; height: 34px; background: var(--linen); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qs-container-name  { font-size: 13px; font-weight: 500; color: var(--espresso); }
.qs-container-meta  { font-size: 11px; color: var(--oak); margin-top: 2px; }
.qs-lock-badge      { display: flex; align-items: center; gap: 4px; background: var(--sand-lt); border: var(--border-active); border-radius: 5px; padding: 3px 8px; flex-shrink: 0; font-size: 10px; color: var(--oak); }
.qs-divider         { width: 100%; height: 0.5px; background: var(--linen); margin-bottom: 20px; }
.qs-btn-primary     { width: 100%; background: var(--sand); border: none; border-radius: var(--r-card); padding: 11px; font-size: 13px; font-weight: 500; color: var(--sand-dk); cursor: pointer; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 10px; }
.qs-btn-primary:hover { opacity: 0.88; }
.qs-btn-secondary   { width: 100%; background: transparent; border: var(--border); border-radius: var(--r-card); padding: 10px; font-size: 13px; color: var(--oak); cursor: pointer; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 14px; }
.qs-btn-secondary:hover { border-color: var(--sand); }
.qs-verified        { display: flex; align-items: center; gap: 5px; background: var(--sage-lt); border-radius: 6px; padding: 4px 10px; font-size: 11px; color: #2B6B4A; font-weight: 500; }
.qs-trail           { display: flex; align-items: center; gap: 6px; }
.qs-trail-node      { background: white; border: var(--border-active); border-radius: 6px; padding: 4px 10px; font-size: 11px; color: var(--sand-dk); font-weight: 500; }
.qs-action-row      { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.qs-action-btn      { display: flex; align-items: center; gap: 6px; background: var(--cream); border: var(--border); border-radius: var(--r-md); padding: 8px 14px; font-size: 12px; color: var(--oak); cursor: pointer; font-family: 'DM Sans', sans-serif; text-decoration: none; }
.qs-action-btn:hover { border-color: var(--sand); }
.qs-action-btn.primary { background: var(--sand); border-color: var(--sand); color: var(--sand-dk); font-weight: 500; }
.qs-guest-badge     { background: var(--linen); color: var(--oak); font-size: 10px; border-radius: 4px; padding: 1px 6px; font-weight: 500; }

/* ── Print label page ─────────────────────────────────────────────────────── */
.pl-two-col         { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }

/* Panel */
.pl-panel           { background: white; border: var(--border); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.pl-panel-title     { font-size: 12px; font-weight: 600; color: var(--espresso); margin-bottom: 1px; }
.pl-panel-sub       { font-size: 11px; color: var(--oak); margin-bottom: 10px; }

/* Type option cards */
.pl-type-opt        { display: flex; align-items: center; gap: 12px; background: white; border: var(--border); border-radius: var(--r-md); padding: 12px; cursor: pointer; text-align: left; font-family: 'DM Sans', sans-serif; width: 100%; margin-bottom: 8px; transition: border-color 0.12s, background 0.12s; }
.pl-type-opt:last-of-type { margin-bottom: 0; }
.pl-type-opt:hover  { border-color: var(--sand); }
.pl-type-opt.selected { border-color: var(--sand); background: var(--sand-lt); }
.pl-type-thumb      { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 44px; }
.pl-type-title      { font-size: 12px; font-weight: 600; color: var(--espresso); }
.pl-type-sub        { font-size: 11px; color: var(--oak); margin-top: 1px; }
.pl-type-radio      { width: 15px; height: 15px; border-radius: 50%; border: 0.5px solid var(--linen); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pl-type-radio.checked { border-color: var(--sand); }
.pl-type-radio-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }

/* Print button */
.pl-btn-print       { display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--sand); border: none; border-radius: var(--r-md); padding: 10px 16px; font-size: 13px; color: var(--sand-dk); cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 600; width: 100%; margin-top: 4px; }
.pl-btn-print:hover { opacity: 0.88; }

/* No QR placeholder */
.pl-no-qr           { background: var(--linen); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--oak); }

/* Preview surface */
.pl-preview-surface { background: var(--cream); border-radius: var(--r-md); padding: 28px 20px; display: flex; align-items: flex-start; justify-content: center; min-height: 200px; margin-top: 10px; }

/* ── 2×2 label (screen preview at ~75px/in → 150×150px) ──────────────────── */
.pl-label-2x2       { background: white; border: 0.5px solid #D0C8C0; border-radius: 5px; width: 150px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.1); font-family: 'Times New Roman', Times, serif; }
.pl-2x2-qr          { width: 100px; height: 100px; }
.pl-2x2-name        { font-size: 12px; font-weight: 700; color: #000; text-align: center; line-height: 1.2; word-break: break-word; font-family: 'Times New Roman', Times, serif; }
.pl-2x2-room        { font-size: 9px; color: #555; text-align: center; font-family: 'Times New Roman', Times, serif; }

/* ── 4×6 label (screen preview at ~55px/in → 220×330px) ──────────────────── */
.pl-label-4x6       { background: white; border: 0.5px solid #D0C8C0; border-radius: 5px; width: 220px; min-height: 330px; padding: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.1); display: flex; flex-direction: column; font-family: 'Times New Roman', Times, serif; }
.pl-4x6-header      { display: flex; align-items: flex-start; gap: 10px; }
.pl-4x6-qr          { width: 66px; height: 66px; flex-shrink: 0; }
.pl-4x6-info        { flex: 1; min-width: 0; padding-top: 4px; }
.pl-4x6-name        { font-size: 13px; font-weight: 700; color: #000; line-height: 1.2; word-break: break-word; font-family: 'Times New Roman', Times, serif; }
.pl-4x6-room        { font-size: 10px; color: #555; margin-top: 3px; font-family: 'Times New Roman', Times, serif; }
.pl-4x6-divider     { height: 0.5px; background: #D0C8C0; margin: 10px 0; }
.pl-4x6-contents-title { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #555; margin-bottom: 6px; font-family: 'Times New Roman', Times, serif; }
.pl-4x6-items       { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
.pl-4x6-item        { display: flex; align-items: center; gap: 4px; }
.pl-4x6-dot         { width: 3px; height: 3px; border-radius: 50%; background: #000; flex-shrink: 0; }
.pl-4x6-item-name   { font-size: 9px; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Times New Roman', Times, serif; }

/* ── Print media — show only the label ───────────────────────────────────── */
@media print {
    /* Hide all layout chrome */
    .sidebar,
    .topbar                     { display: none !important; }

    /* Hide the left settings panel */
    .pl-two-col > div:first-child { display: none !important; }

    /* Collapse layout wrappers */
    .app-shell,
    .main-area,
    .content-area               { display: block !important; padding: 0 !important; margin: 0 !important; }
    .pl-two-col                 { display: block !important; }
    .pl-panel                   { border: none !important; padding: 0 !important; box-shadow: none !important; background: transparent !important; }
    .pl-panel-title,
    .pl-panel-sub               { display: none !important; }

    /* Preview surface becomes the full page */
    .pl-preview-surface {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Labels fill the physical page area */
    .pl-label-2x2 {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        width: 2in !important;
        height: 2in !important;
        padding: 0.12in !important;
    }
    .pl-2x2-qr     { width: 1.3in !important; height: 1.3in !important; }
    .pl-2x2-name   { font-size: 14pt !important; }
    .pl-2x2-room   { font-size: 10pt !important; }

    .pl-label-4x6 {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        width: 4in !important;
        min-height: 6in !important;
        padding: 0.2in !important;
    }
    .pl-4x6-qr          { width: 1.2in !important; height: 1.2in !important; }
    .pl-4x6-name        { font-size: 16pt !important; }
    .pl-4x6-room        { font-size: 11pt !important; }
    .pl-4x6-contents-title { font-size: 9pt !important; }
    .pl-4x6-item-name   { font-size: 10pt !important; white-space: normal !important; }
    .pl-4x6-dot         { width: 4px !important; height: 4px !important; }
}
