/**
 * Lister - Main Styles
 * Mobile-first, clean, light gray background, black buttons
 */

/* =============================================================================
   CSS Variables
   ============================================================================= */
:root {
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-light: #999999;
  --primary: #1a1a1a;
  --primary-hover: #333333;
  --border: #e0e0e0;
  --border-focus: #1a1a1a;
  --star-filled: #f5a623;
  --star-empty: #e0e0e0;
  --danger: #c0392b;
  --danger-hover: #a93226;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.12);
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --tap-min: 44px;
}

/* =============================================================================
   Reset & Base
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

a { color: var(--primary); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, button { font-size: 16px; } /* Prevents iOS zoom on focus */

/* =============================================================================
   Layout
   ============================================================================= */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.page--centered {
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

/* =============================================================================
   Header / Nav
   ============================================================================= */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.header__title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header--list {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding-bottom: 16px;
  margin-bottom: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(16px, calc(50vw - 300px));
  padding-right: max(16px, calc(50vw - 300px));
}

.header--list .btn-back {
  justify-self: start;
}

@media (max-width: 600px) {
  .header--list {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header--list .btn-back {
    margin-left: -16px;
  }
}

.header--list .header__title-wrap {
  justify-content: center;
  gap: 2px;
  justify-self: center;
  flex-direction: column;
}

.header__title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header--list .header__actions {
  justify-self: end;
}

/* Back + centered title (add item, edit item, edit list, profile) */
.header--back {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.header--back .btn-back {
  justify-self: start;
  margin-left: -16px;
}
.header--back .header__title {
  justify-self: center;
  grid-column: 2;
}

.header__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.header__title-menu {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.header__title-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin: -8px -12px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.header__title-btn:hover {
  background: var(--border);
}

.header__title-btn .header__title {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

.header__title-chevron {
  display: inline-flex;
  align-items: center;
  width: 0.6em;
  height: 0.6em;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}

.header__title-chevron svg {
  width: 100%;
  height: 100%;
  transform: rotate(90deg);
}

.header__title--static {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.list-options-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 140px;
  padding: 6px 0;
  z-index: 100;
}

.list-options-dropdown .menu-dropdown__item {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
  text-align: left;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.btn-back:hover { background: var(--border); }
.btn-back::before {
  content: '←';
  margin-right: 4px;
}

/* Menu button */
.btn-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  border-radius: var(--radius-sm);
}
.btn-menu:hover { background: var(--border); }
.btn-menu--sm {
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
}

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 20px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--secondary {
  background: white;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--secondary:hover { background: var(--bg); }

.btn--danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn--danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: none;
}
.btn--ghost:hover { background: var(--border); }

.btn--full { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 0.9rem; }
.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon__svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* =============================================================================
   Form Elements
   ============================================================================= */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-label--optional::after {
  content: ' (optional)';
  font-weight: 400;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-light); }

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* File input styled as button */
.form-file-wrap {
  position: relative;
}
.form-file-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* =============================================================================
   Auth Screen
   ============================================================================= */
.auth-screen {
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.auth-screen__logo {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.auth-screen__desc {
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.auth-form .form-group { margin-bottom: 16px; }
.auth-form .btn { margin-top: 8px; width: 100%; }

.auth-form__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* =============================================================================
   Cards
   ============================================================================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.card--clickable:hover { box-shadow: var(--shadow-hover); }
.card--clickable { cursor: pointer; }

/* List card (home) */
.list-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
}

.list-card__image-wrap {
  aspect-ratio: 16/9;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.list-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 2rem;
  background: linear-gradient(135deg, #e8e8e8 0%, #f0f0f0 100%);
}

.list-card__body {
  padding: 14px 16px;
}

.list-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.list-card__header:last-child {
  margin-bottom: 0;
}

.list-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.list-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: capitalize;
}

.badge--private { background: #e8e8e8; color: var(--text-muted); }
.badge--shared { background: #e3f2fd; color: #1565c0; }
.badge--public { background: #e8f5e9; color: #2e7d32; }
.badge--count { background: #e8e8e8; color: var(--text-muted); }

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

/* Item card (list detail) */
.item-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: visible;
  margin-bottom: 20px;
}

.item-card__body {
  padding: 16px 0;
}

.item-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.item-card__header-text {
  flex: 1;
  min-width: 0;
}

.item-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.item-card__menu-wrap {
  position: relative;
  flex-shrink: 0;
  margin-right: -8px;
}
.btn-item-menu {
  padding: 6px;
}
.btn-item-menu__dots {
  width: 16px;
  height: 5px;
  display: block;
}

.item-card__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 140px;
  padding: 6px 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.item-card__dropdown.hidden {
  display: none;
}

.item-card__dropdown .menu-dropdown__item {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.item-card__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0 0;
  line-height: 1.25;
}

.item-card__image-wrap {
  aspect-ratio: 1;
  background: var(--border);
  overflow: hidden;
}

.item-card__image-wrap--landscape .item-card__image {
  height: auto;
  object-fit: fill;
}

@media (max-width: 600px) {
  #view-list .item-card__image-wrap,
  #content .item-card__image-wrap {
    margin-left: -16px;
    margin-right: -16px;
  }
}

.item-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card__image-placeholder {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 2.5rem;
  background: linear-gradient(135deg, #e8e8e8 0%, #f0f0f0 100%);
}

.item-card__rating {
  display: flex;
  gap: 2px;
  margin: 12px 0 8px;
}

.star {
  color: var(--star-empty);
  font-size: 1.25rem;
}
.star.filled { color: var(--star-filled); }

.item-card__notes {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  white-space: pre-wrap;
  border-left: 3px solid var(--border);
  padding-left: 12px;
}

/* =============================================================================
   Sort Control
   ============================================================================= */
.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sort-control__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-control__select {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-weight: 500;
  min-width: 160px;
}

.sort-control--list {
  justify-content: center;
}

.home-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.header--home {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.header--home .header__actions {
  display: flex;
  align-items: center;
}
.header--home .header__actions--left {
  justify-self: start;
  margin-left: -8px;
}
.header--home .header__actions--right {
  justify-self: end;
}
.header--home .btn-menu {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  font-size: 2rem;
}
.header--home__sort {
  justify-self: center;
  display: flex;
  align-items: center;
}

.sort-control__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-control__meta #list-meta-count,
.sort-control__meta #list-meta-visibility {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-control__meta .badge {
  line-height: 1;
  padding-top: 4px;
  padding-bottom: 4px;
}


.sort-control__sort-wrap {
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
}

.badge--sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: #e8e8e8;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.badge--sort:hover {
  background: #ddd;
  color: var(--text);
}

.badge__chevron {
  font-size: 0.7rem;
  transform: rotate(90deg);
  font-weight: 400;
}

.sort-control__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 160px;
  padding: 6px 0;
  z-index: 100;
}

.sort-control__dropdown .menu-dropdown__item {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
  text-align: left;
}

/* =============================================================================
   Empty State
   ============================================================================= */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state__icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.empty-state__desc {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

/* =============================================================================
   Add Item - Photo Picker
   ============================================================================= */
.photo-picker {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.photo-picker:hover,
.photo-picker:focus-within {
  border-color: var(--border-focus);
  background: var(--bg);
}

.photo-picker__icon {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.photo-picker__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.photo-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto 16px;
}

.photo-preview img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.photo-preview__change {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Edit item: compact replace photo picker */
#view-edit-item .form-file-wrap {
  display: inline-block;
}
#view-edit-item .form-group:has(.photo-picker) {
  text-align: center;
}
#view-edit-item .photo-picker {
  padding: 6px 10px;
  border-width: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#view-edit-item .photo-picker__icon {
  font-size: 1rem;
  margin-bottom: 0;
}
#view-edit-item .photo-picker__text {
  font-size: 0.8rem;
}

/* =============================================================================
   Upload Progress
   ============================================================================= */
.upload-progress {
  margin: 16px 0;
}

.upload-progress__bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.2s;
}

.upload-progress__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* =============================================================================
   Modal / Overlay
   ============================================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.modal__body {
  padding: 20px;
}

.modal__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* =============================================================================
   Menu Dropdown
   ============================================================================= */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 999;
}

.menu-dropdown {
  position: absolute;
  top: calc(var(--safe-top) + 56px);
  left: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 180px;
  padding: 8px 0;
  z-index: 1000;
  animation: slideUp 0.2s ease;
}

.menu-dropdown__item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-align: left;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
}
.menu-dropdown__item:hover { background: var(--bg); }
.menu-dropdown__item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.menu-dropdown__item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* =============================================================================
   Visibility Selector
   ============================================================================= */
.visibility-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visibility-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.visibility-option:hover { border-color: var(--text-light); }
.visibility-option.selected {
  border-color: var(--primary);
  background: var(--bg);
}

.visibility-option__radio {
  margin-right: 12px;
  accent-color: var(--primary);
}

.visibility-option__label {
  font-weight: 500;
  flex: 1;
}

.visibility-option__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =============================================================================
   Shared Users Section
   ============================================================================= */
.shared-users {
  margin-top: 20px;
}

.shared-users__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.shared-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.shared-user__info {
  font-size: 0.95rem;
}

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

.shared-user__remove {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.invite-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.invite-form input {
  flex: 1;
}

/* =============================================================================
   Profile Page
   ============================================================================= */
.profile-section {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.profile-section__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.profile-section__row:last-child { border-bottom: none; }

.profile-section__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-section__value {
  font-weight: 500;
}

.profile-section__edit {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  max-width: 100%;
}
.profile-section__edit input {
  flex: 1;
  min-width: 0;
}

/* =============================================================================
   Public List (read-only)
   ============================================================================= */
.header--public {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.header--public .header__title--left {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.header--public .header__owner {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.public-sign-in {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: -8px 0 16px;
  text-align: center;
}
.public-sign-in__link {
  color: var(--primary);
  font-weight: 600;
}

/* =============================================================================
   Loading & Error
   ============================================================================= */
.loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.error-message {
  background: #ffebee;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* =============================================================================
   Utilities
   ============================================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
