* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #435165 0%, #2d3748 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-content {
  text-align: center;
  animation: splash-fadein 0.4s ease-out;
}
@keyframes splash-fadein {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.35));
  animation: splash-float 2.5s ease-in-out infinite;
}
@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.splash-title {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.splash-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
}
.splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: rgba(255,255,255,0.7);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nav-club-link {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-club {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}
.nav-club-label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .nav-club-label { display: none; }
}
@media (max-width: 560px) {
  .nav-club-link { display: none; }
}
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.nav-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.search-bar {
  display: flex;
  gap: 6px;
  max-width: 400px;
  width: 100%;
}
.search-bar input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-width: 0;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ws-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s;
}
.ws-connected { background: #48bb78; }
.ws-connecting { background: #ecc94b; animation: pulse-dot 1s infinite; }
.ws-disconnected { background: #fc8181; animation: pulse-dot 0.6s infinite; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 55, 72, 0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #4299e1;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.nav-user-menu {
  position: relative;
}
.nav-user-trigger {
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  user-select: none;
}
.nav-user-trigger:hover {
  color: #2d3748;
}
.nav-user-trigger::after {
  content: ' \25BE';
  font-size: 10px;
}
.nav-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.nav-dropdown.hidden {
  display: none;
}
.nav-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
}
.nav-dropdown button:hover {
  background: #f7fafc;
  color: #2d3748;
}

.breadcrumb {
  padding: 8px 16px;
  font-size: 14px;
  color: #718096;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  min-height: 44px;
  flex-wrap: wrap;
  gap: 2px;
}
.breadcrumb a {
  color: #4299e1;
  cursor: pointer;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.bc-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.bc-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
a.bc-segment {
  background: #ebf4ff;
  transition: background 0.15s;
  text-decoration: none !important;
}
a.bc-segment:hover {
  background: #bee3f8;
}
.bc-segment.bc-home {
  padding: 4px;
}
.bc-segment.bc-home .bc-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.bc-home-icon {
  width: 22px;
  height: 22px;
  color: #64748b;
  flex-shrink: 0;
}
.bc-sep { color: #cbd5e0; margin: 0 2px; vertical-align: middle; font-size: 16px; }
.bc-current { color: #2d3748; font-weight: 500; background: #f7fafc; }

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
  width: 100%;
}

.page-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}
.page-header h2 {
  font-size: 22px;
  color: #2d3748;
}

.entity-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.entity-photo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: #e2e8f0;
}
.entity-photo.large {
  width: 200px;
  height: 200px;
}
.entity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  display: none;
}
.photo-actions-beside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.photo-btn-beside {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  color: #4a5568;
  background: #f7fafc;
  transition: background 0.15s, border-color 0.15s;
}
.photo-btn-beside:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}
.photo-btn-beside:active {
  background: #e2e8f0;
}
.photo-btn-beside-danger {
  color: #e53e3e;
  border-color: #fed7d7;
  background: #fff5f5;
}
.photo-btn-beside-danger:hover {
  background: #fed7d7;
  border-color: #fc8181;
}

.entity-info {
  flex: 1;
  min-width: 0;
}
.entity-info h2 {
  font-size: 22px;
  margin-bottom: 4px;
  color: #2d3748;
}
.entity-info p {
  color: #718096;
  margin-bottom: 8px;
}
.btn-icon {
  background: none;
  border: 1px solid #cbd5e0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  color: #718096;
  padding: 0;
  transition: all 0.15s;
}
.btn-icon:hover { background: #edf2f7; color: #4a5568; }
.btn-icon-danger { color: #e53e3e; border-color: #feb2b2; }
.btn-icon-danger:hover { background: #fff5f5; color: #c53030; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px;
}
.section-header h3 {
  font-size: 16px;
  color: #4a5568;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e2e8f0;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-locked {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  filter: grayscale(60%);
}
.card-body {
  padding: 10px;
}
.card-body h3 {
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-desc {
  font-size: 12px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #edf2f7;
  color: #4a5568;
}
.badge-shared { background: #ebf8ff; color: #2b6cb0; }
.badge-open { background: #f0fff4; color: #276749; }

.share-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12px;
}
.share-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  color: #718096;
  user-select: none;
}
.share-toggle:hover { color: #4a5568; }
.share-toggle h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
}
.share-toggle .share-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}
.share-section.open .share-arrow { transform: rotate(90deg); }
.share-body {
  display: none;
  padding: 0 12px 10px;
}
.share-section.open .share-body { display: block; }
.share-empty { color: #a0aec0; font-size: 11px; margin: 4px 0; font-style: italic; }
.owner-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.owner-label { color: #718096; font-size: 11px; }
.badge-owner { background: #fefcbf; color: #975a16; font-size: 11px; padding: 2px 8px; }
.badge-position { background: #e2e8f0; color: #4a5568; font-size: 10px; padding: 2px 6px; }
.badge-category { background: #e9d5ff; color: #6b21a8; font-size: 10px; padding: 2px 6px; border-radius: 8px; }
.category-filter { margin: 8px 0 4px 0; }
.category-filter select { padding: 6px 10px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 14px; background: #fff; color: #334155; }
.edit-position {
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 12px;
  width: 140px;
  background: #fff;
}
.loc-move-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.move-option-inline {
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  background: #f7fafc;
}
.move-option-inline:hover { background: #edf2f7; }
.move-option-inline.move-current {
  background: #ebf8ff;
  border-color: #90cdf4;
  cursor: default;
  font-weight: 500;
}
.sharing-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.sharing-control label { color: #718096; font-size: 11px; }
.sharing-control select {
  padding: 3px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  background: #fff;
}
.transfer-select {
  padding: 3px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  background: #fff;
}
.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.share-list .badge-shared {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
}
.share-remove {
  background: none;
  border: none;
  color: #2b6cb0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  font-weight: bold;
}
.share-remove:hover { color: #c53030; }
.share-empty {
  color: #a0aec0;
  font-size: 11px;
  margin: 0 0 8px 0;
}
.share-add {
  display: flex;
  gap: 6px;
  align-items: center;
}
.share-add select {
  padding: 3px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  background: #fff;
}
.photo-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.photo-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}
.photo-thumb.is-default { border-color: #4299e1; }
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-thumb-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  background: rgba(0,0,0,0.5);
  padding: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-thumb:hover .photo-thumb-actions { opacity: 1; }
.photo-thumb-actions button {
  background: none;
  border: none;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  padding: 1px 4px;
}
.photo-thumb-actions button:hover { color: #fc8181; }


.item-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.item-detail > .item-gallery,
.item-detail > .item-files,
.item-detail > .share-section {
  width: 100%;
}
.item-photo-section {
  flex-shrink: 0;
  text-align: center;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.photo-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.item-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0 24px 16px;
}
.gallery-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.gallery-default {
  border-color: #4299e1;
}
.gallery-actions {
  position: absolute;
  bottom: 2px;
  right: 2px;
  display: flex;
  gap: 2px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.gallery-thumb:hover .gallery-actions,
.gallery-thumb:active .gallery-actions { opacity: 1; }
.photo-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  color: #fff;
  background: rgba(0,0,0,0.55);
  transition: background 0.15s;
}
.photo-btn:hover { background: rgba(0,0,0,0.8); }
.photo-btn-danger { background: rgba(200,30,30,0.7); }
.photo-btn-danger:hover { background: rgba(180,20,20,0.9); }
.gallery-actions .photo-btn {
  width: 20px;
  height: 20px;
  font-size: 11px;
  line-height: 20px;
}
.gallery-add {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  border: 2px dashed #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #a0aec0;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.gallery-add:hover { border-color: #4299e1; color: #4299e1; }
.gallery-fullview {
  text-align: center;
}
.gallery-fullview img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}
.item-info-section {
  flex: 1;
  min-width: 0;
}
.item-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  font-size: 14px;
  color: #718096;
}
.box-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4299e1;
  cursor: pointer;
  text-decoration: none;
}
.box-link:hover { text-decoration: underline; }
.inline-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.edit-title {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  width: 100%;
  padding: 4px 0;
  transition: border-color 0.2s;
}
.edit-title:focus {
  outline: none;
  border-bottom-color: #4299e1;
}
.edit-desc {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #4a5568;
  resize: none;
  padding: 4px 0;
  min-height: 40px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.edit-desc:focus {
  outline: none;
  border-bottom-color: #4299e1;
}

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #4a5568;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn:hover { background: #f7fafc; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-primary {
  background: #4299e1;
  color: #fff;
  border-color: #4299e1;
}
.btn-primary:hover { background: #3182ce; }
.btn-danger {
  color: #e53e3e;
  border-color: #fed7d7;
}
.btn-danger:hover { background: #fff5f5; }
.btn-outline {
  background: transparent;
  border-color: #e2e8f0;
}
.btn-outline:hover { background: #f7fafc; }
.btn-full { width: 100%; justify-content: center; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.modal-header h3 {
  font-size: 16px;
  color: #2d3748;
}
.modal-body {
  padding: 20px;
}

.move-list h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: #a0aec0;
  margin: 12px 0 6px;
  letter-spacing: 0.5px;
}
.move-list h4:first-child { margin-top: 0; }
.move-option {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.move-option .badge { margin-left: auto; }
.move-option-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.move-option:hover { background: #ebf8ff; }
.move-current {
  background: #f7fafc;
  color: #a0aec0;
  cursor: default;
}

.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 4px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.form-group textarea {
  min-height: 60px;
  resize: vertical;
}

.hidden { display: none !important; }

.empty-state {
  text-align: center;
  color: #a0aec0;
  padding: 40px;
  font-size: 15px;
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2d3748;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  pointer-events: none;
}
.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-error { background: #e53e3e; }
.toast-pending { background: #4a5568; }
.toast-success { background: #38a169; }

.ws-banner {
  background: #fefcbf;
  color: #744210;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #f6e05e;
}
.ws-banner.hidden { display: none; }

body.ws-offline .content {
  opacity: 0.6;
  pointer-events: none;
}

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
  background: linear-gradient(135deg, #435165 0%, #2d3748 100%);
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}
.auth-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 12px;
}
.auth-card h1 {
  font-size: 22px;
  color: #2d3748;
  margin-bottom: 24px;
}
.auth-card .form-group {
  text-align: left;
}
.auth-link {
  margin-top: 16px;
  font-size: 14px;
  color: #718096;
}
.auth-link a {
  color: #4299e1;
  text-decoration: none;
}
.auth-link a:hover { text-decoration: underline; }
.auth-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #a0aec0;
}
.remember-row {
  margin: 12px 0 4px;
  text-align: left;
}

.remember-label {
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.remember-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.error-msg {
  background: #fff5f5;
  color: #e53e3e;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.manage-delete-row {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.action-row-right {
  justify-content: flex-end;
}
.action-right {
  margin-left: auto;
}
.form-group-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.form-group-inline label {
  font-size: 13px;
  font-weight: 500;
  color: #718096;
  white-space: nowrap;
  margin: 0;
}

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #1e293b;
  font-size: 13px;
}
.footer-left {
  color: #94a3b8;
}
.footer-right {
  display: flex;
  align-items: center;
}
.footer-email {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-email:hover {
  color: #e2e8f0;
}
.footer-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .navbar { flex-wrap: wrap; }
  .nav-center { order: 3; flex-basis: 100%; }
  .search-bar { max-width: 100%; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .entity-header { flex-direction: column; align-items: center; text-align: center; }
  .entity-header .photo-actions-beside { flex-direction: row; }
  .entity-info { text-align: center; }
  .item-detail { flex-direction: column; align-items: center; }
  .item-photo-section { flex-direction: column; align-items: center; }
  .item-photo-section .photo-actions-beside { flex-direction: row; }
  .item-info-section { text-align: center; }
  .action-row { justify-content: center; }
  .item-location { justify-content: center; }
  .sharing-control { justify-content: center; }
  .site-footer { flex-direction: column; gap: 8px; text-align: center; }
}

.item-files {
  margin: 16px 0;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 6px;
}

.file-download {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-decoration: none;
  color: #333;
  min-width: 0;
}

.file-download:hover {
  color: #e8491d;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.file-size {
  color: #999;
  font-size: 12px;
  white-space: nowrap;
}

.file-delete {
  background: #fee;
  border: 1px solid #c33;
  color: #c33;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-delete:hover {
  background: #c33;
  color: #fff;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  gap: 12px;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-user-name {
  font-weight: 600;
  font-size: 15px;
}

.admin-user-date {
  font-size: 12px;
  color: #888;
}

.admin-badge {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

.admin-user-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-admin-grant {
  background: #27ae60;
  color: #fff;
  border: none;
}

.btn-admin-grant:hover {
  background: #219a52;
}

.btn-admin-revoke {
  background: #f39c12;
  color: #fff;
  border: none;
}

.btn-admin-revoke:hover {
  background: #d68910;
}

.section-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-check {
  display: none;
}
.select-mode .card-check {
  display: block;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.25);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.select-mode .card {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.select-mode .card.card-selected .card-check {
  background: #4299e1;
  border-color: #fff;
}
.select-mode .card.card-selected .card-check::after {
  content: '\2713';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.select-mode .card.card-selected {
  box-shadow: 0 0 0 3px #4299e1;
}

.bulk-bar {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: bottom 0.25s ease;
  white-space: nowrap;
}
.bulk-bar-visible {
  bottom: 24px;
}
.bulk-count {
  font-size: 14px;
  font-weight: 600;
}
.bulk-bar .btn {
  font-size: 13px;
  padding: 6px 14px;
}
.bulk-bar .btn:last-child {
  background: none;
  color: #a0aec0;
  font-size: 18px;
  padding: 2px 8px;
  line-height: 1;
  border: none;
}
.bulk-bar .btn:last-child:hover {
  color: #fff;
}
@media (max-width: 480px) {
  .bulk-bar {
    left: 12px;
    right: 12px;
    transform: none;
    padding: 8px 14px;
    gap: 8px;
    justify-content: center;
  }
  .bulk-bar .btn {
    font-size: 12px;
    padding: 5px 10px;
  }
  .bulk-count {
    font-size: 13px;
  }
}
