/* redwhite Inventory — Graphite (lighter dark), sparse crimson accent */
:root {
  --bg: #333333;
  --bg-elevated: #3a3a3a;
  --surface: #3d3d3d;
  --surface-2: #454545;
  --border: #555555;
  --border-strong: #666666;
  --text: #f5f5f5;
  --text-muted: #b5b5b5;
  --text-dim: #8a8a8a;
  --cool: #e5e5e5;
  --accent: #b91c1c;
  --accent-hover: #991b1b;
  --accent-soft: rgba(185,28,28,0.12);
  --ok: #34d399;
  --ok-bg: rgba(52,211,153,0.12);
  --err: #f87171;
  --err-bg: rgba(248,113,113,0.12);
  --warn: #fbbf24;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 8px 24px rgba(0,0,0,0.45);
  --topbar-h: 56px;
  --bottom-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --touch: 48px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a { color: var(--text-muted); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a:active { color: var(--accent-hover); }

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(51,51,51,0.94);
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  min-height: var(--topbar-h);
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-titles { min-width: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none !important;
}
.brand-square {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent) url("assets/favicon.png") center / cover no-repeat;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.brand-square-fallback {
  background-image: none;
}
.brand-square-fallback::after {
  content: "rw";
  text-transform: lowercase;
}
.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.brand-mark {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}
.brand-app {
  color: var(--text-dim);
  font-weight: 550;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.topbar-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  padding-left: 38px;
}
.topbar-page-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.topbar-quiet-link {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none !important;
  padding: 8px 4px;
}
.topbar-quiet-link:hover { color: var(--text-muted); }

.icon-btn,
a.icon-btn,
button.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  color: var(--text-muted);
  background: transparent;
  background-image: none;
  border: 0;
  box-shadow: none;
  gap: 0;
  font-weight: inherit;
  text-decoration: none !important;
  transform: none;
}
.icon-btn:hover,
a.icon-btn:hover,
button.icon-btn:hover {
  background: var(--surface);
  background-image: none;
  color: var(--text);
  transform: none;
}
.icon-btn:active,
button.icon-btn:active {
  transform: none;
}
.icon-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

.avatar-btn {
  list-style: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--border-strong);
}
.user-menu { position: relative; }
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 50;
}
.user-menu-name { font-weight: 600; }
.user-menu-email { font-size: 0.8rem; margin-bottom: 10px; }
.menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none !important;
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
}
.menu-link:last-child { margin-bottom: 0; }
.menu-link-muted {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 550;
}

.app-main {
  flex: 1;
  padding: 16px 14px 24px;
}
body.has-bottom-nav .app-main {
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom) + 20px);
}

.page-head { margin-bottom: 14px; }
.page-title {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  font-weight: 760;
}

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 0.85rem; }

.toast {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-weight: 550;
}
.toast-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(52,211,153,0.25); }
.toast-err { background: var(--err-bg); color: var(--err); border: 1px solid rgba(248,113,113,0.25); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}
.card-flush { padding: 0; overflow: hidden; }
.card-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  margin: 18px 4px 8px;
}

.entity-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none !important;
  transition: transform .12s ease, border-color .12s ease;
}
.entity-card:active { transform: scale(0.985); }
.entity-card:hover { border-color: var(--border-strong); }
.entity-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.entity-name {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.entity-meta { color: var(--text-muted); font-size: 0.9rem; }
.entity-stats {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--surface-2);
  color: var(--cool);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 650;
}

.list { list-style: none; margin: 0; padding: 0; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none !important;
}
.list-row:last-child { border-bottom: 0; }
.list-row:active { background: rgba(255,255,255,0.03); }
.list-row-body { flex: 1; min-width: 0; }
.list-row-title {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chev {
  color: var(--text-dim);
  flex-shrink: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  color: var(--text-muted);
  flex-shrink: 0;
}
.chip-owner { background: rgba(185,28,28,0.16); color: #f0a0a0; }
.chip-editor { background: rgba(248,248,248,0.10); color: #f8f8f8; }
.chip-viewer { background: rgba(115,115,115,0.22); color: #d4d4d4; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  margin: 0 0 6px;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  margin-bottom: 12px;
  appearance: none;
  -webkit-appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.22);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}
@media (min-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: 1 / -1; }
}

.btn, button, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  width: 100%;
}
.btn:hover, button:hover, .btn-primary:hover {
  background: var(--accent-hover);
}
.btn:active, button:active { transform: translateY(1px); }
.btn-secondary, .btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-danger {
  background: rgba(248,113,113,0.16);
  color: #fecaca;
  border: 1px solid rgba(248,113,113,0.28);
}
.btn-danger-quiet {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  box-shadow: none;
  font-weight: 600;
}
.btn-danger-quiet:hover,
.btn-danger-quiet:focus-visible {
  color: #fecaca;
  background: rgba(248,113,113,0.10);
  border-color: rgba(248,113,113,0.22);
}
.btn-danger-quiet:active {
  transform: none;
  background: rgba(248,113,113,0.16);
}
.btn-sm {
  min-height: 40px;
  padding: 8px 12px;
  width: auto;
  font-size: 0.9rem;
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-row > * { flex: 1; }

details.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
details.panel > summary {
  list-style: none;
  cursor: pointer;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-weight: 700;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary { border-bottom: 1px solid var(--border); }
.panel-body { padding: 14px; }

/* Folder-style tabs (room edit / add item) */
.folder-tabs {
  margin-bottom: 14px;
}
.folder-tablist {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.folder-tabs .folder-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--touch);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: auto;
  box-shadow: none;
  text-align: center;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}
.folder-tabs .folder-tab:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}
.folder-tabs .folder-tab:active {
  transform: none;
  background: var(--surface);
}
.folder-tabs .folder-tab.is-active,
.folder-tabs .folder-tab.is-active:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  border-bottom-color: var(--surface);
  box-shadow: inset 0 -2px 0 var(--accent);
  position: relative;
  z-index: 1;
}
.folder-tabs .folder-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.folder-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px;
  margin-top: -1px;
}
.folder-panel[hidden] {
  display: none !important;
}
.folder-tabs[data-open=""] .folder-tablist .folder-tab,
.folder-tabs:not([data-open]) .folder-tablist .folder-tab {
  border-radius: var(--radius-sm);
}
.folder-tabs[data-open="edit"] .folder-tablist,
.folder-tabs[data-open="add"] .folder-tablist {
  margin-bottom: 0;
}


.empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
}
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--cool);
  font-size: 1.4rem;
  border: 1px solid var(--border);
}
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-main-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 999px;
}
.photo-tile-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.photo-tile-actions form { margin: 0; }
.photo-tile-actions .icon-btn,
.photo-tile-actions button.icon-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  background: rgba(0,0,0,0.55) !important;
  background-image: none !important;
  color: #f5f5f5 !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.photo-tile-actions .icon-btn:hover,
.photo-tile-actions button.icon-btn:hover,
.photo-tile-actions .icon-btn-danger:hover,
.photo-tile-actions button.icon-btn-danger:hover {
  background: rgba(127,29,29,0.85) !important;
  color: #fecaca !important;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 720px;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(51,51,51,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 40;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-dim);
  text-decoration: none !important;
  font-size: 0.72rem;
  font-weight: 650;
}
.bottom-nav-item.active { color: var(--accent); }

.login-hero {
  text-align: center;
  padding: 8px 8px 14px;
}
.login-hero .muted {
  margin: 0;
}

.about-hero {
  text-align: center;
  padding: 8px 8px 4px;
}
.about-logo {
  display: block;
  margin: 0 auto 14px;
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.about-wordmark {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: lowercase;
}
.about-note {
  margin: 0 auto 18px;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.app-footer-links {
  text-align: center;
  padding: 8px 14px 18px;
  font-size: 0.8rem;
}
.app-footer-links a { color: var(--text-dim); }
.app-footer-links a:hover { color: var(--accent); }

.code-fallback {
  margin: 12px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.28);
  color: #fde68a;
  text-align: center;
}
.code-fallback code {
  display: inline-block;
  margin-top: 6px;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 8px;
  margin: -6px 0 14px;
  flex-wrap: wrap;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 10px;
  font-size: 0.92rem;
}
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; word-break: break-word; }

@media (min-width: 721px) {
  body { padding: 12px 0 24px; }
  .app-shell {
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    min-height: calc(100vh - 36px);
    background: rgba(51,51,51,0.92);
  }
  .bottom-nav { max-width: 720px; border-radius: 0 0 24px 24px; }
}

/* Cover thumbs / heroes */
.entity-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.entity-cover {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.entity-cover-placeholder {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--text-dim);
}
.list-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.list-thumb-placeholder {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.hero-cover {
  margin: 0 0 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  height: 160px;
}
.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-cover-sm {
  height: 110px;
}


/* Property photos organizer */
.photo-org-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.photo-org-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.photo-org-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.photo-org-media {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.photo-org-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-org-body { min-width: 0; }
.photo-org-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.photo-org-top-main { min-width: 0; flex: 1; }
.photo-org-meta { margin: 0 0 6px; }
.photo-org-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}
.photo-org-unlink-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  margin-top: -4px;
  margin-right: -4px;
}
.photo-org-unlink-actions form { margin: 0; }
.photo-org-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.photo-org-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 700;
}
.photo-org-filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.photo-org-filter.is-active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(248,248,248,0.08);
}
.photo-org-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(248,248,248,0.08);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 750;
}
.photo-org-filter.is-active .photo-org-filter-count {
  background: rgba(248,248,248,0.14);
  color: var(--text-muted);
}
.photo-org-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-org-actions form {
  margin: 0;
}
.photo-org-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.photo-org-inline-form select {
  flex: 1 1 140px;
  min-width: 0;
  margin: 0;
}
.photo-org-inline-form button {
  width: auto;
  flex: 0 0 auto;
}
.photo-org-check {
  display: flex !important;
  align-items: center;
  gap: 4px;
  min-height: auto !important;
  margin: 0 !important;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.photo-org-check input {
  width: auto !important;
  min-height: auto !important;
  margin: 0 !important;
}
a.folder-tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Room / people list rows with icon actions */
.list-row-with-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--border);
  min-height: var(--touch);
}
.list-row-with-actions:last-child { border-bottom: 0; }
.list-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none !important;
  padding: 4px 0;
}
.list-row-main:active { opacity: 0.85; }
.list-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.list-row-actions form { margin: 0; }
.list-row-actions .icon-btn,
.list-row-actions button.icon-btn,
.people-row-actions .icon-btn,
.people-row-actions button.icon-btn,
button.icon-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text-muted);
  font-weight: inherit;
  gap: 0;
  transform: none;
}
.list-row-actions .icon-btn:hover,
.list-row-actions button.icon-btn:hover,
.people-row-actions .icon-btn:hover,
.people-row-actions button.icon-btn:hover,
button.icon-btn:hover {
  background: var(--surface) !important;
  background-image: none !important;
  color: var(--text);
  transform: none;
}
.icon-btn-danger,
button.icon-btn-danger {
  color: var(--text-muted) !important;
}
.icon-btn-danger:hover,
.icon-btn-danger:focus-visible,
button.icon-btn-danger:hover,
button.icon-btn-danger:focus-visible {
  color: #fecaca !important;
  background: rgba(248,113,113,0.10) !important;
  background-image: none !important;
}
.icon-btn-danger:disabled,
button.icon-btn-danger:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.people-row {
  border-bottom: 1px solid var(--border);
}
.people-row:last-child { border-bottom: 0; }
.people-row-main {
  border-bottom: 0 !important;
}
.people-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
}
.people-role-form {
  flex: 1;
  margin: 0;
}
.people-role-form select {
  margin: 0;
  min-height: 40px;
  padding: 8px 12px;
}

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