* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; background: #0d0505; color: #f5e6d3; min-height: 100vh; }

/* Login */
.screen-full { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-center { width: 100%; max-width: 400px; padding: 1.5rem; }
.login-card { padding: 2rem; }
.login-card h1 { margin: 0 0 1.5rem; font-size: 1.5rem; color: #A0522D; text-align: center; }

/* Panel layout */
#screen-panel { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: #1a0a0a;
  border-right: 1px solid #3d2010;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #3d2010; }
.sidebar-header h1 { margin: 0; font-size: 1.25rem; color: #A0522D; }
.sidebar-sub { font-size: 0.75rem; color: #b8a090; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #b8a090;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(139,69,19,0.15); color: #f5e6d3; }
.nav-item.active { background: rgba(139,69,19,0.25); color: #f5e6d3; font-weight: 600; }
.nav-icon { font-size: 1.1rem; }
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #3d2010;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-email { font-size: 0.8rem; color: #b8a090; word-break: break-all; }

/* Main content */
.main { flex: 1; padding: 1.5rem 2rem; overflow-y: auto; }
.page h2 { margin: 0 0 1.5rem; font-size: 1.5rem; color: #f5e6d3; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h2 { margin: 0; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #1a0a0a;
  border: 1px solid #3d2010;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: #A0522D; }
.stat-label { font-size: 0.9rem; color: #b8a090; }

/* Search */
.search-wrap { display: flex; gap: 0.5rem; }
.search-input {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #3d2010;
  background: #0d0505;
  color: #f5e6d3;
  min-width: 240px;
}

/* Cards & forms */
.card { background: #1a0a0a; border: 1px solid #3d2010; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { margin: 0 0 0.5rem; font-size: 1.1rem; color: #A0522D; }
.muted { color: #b8a090; font-size: 0.9rem; margin: 0 0 1rem; }
.form label { display: block; margin-bottom: 1rem; }
.form label input, .form label select, .form textarea {
  width: 100%; padding: 0.5rem 0.75rem; border-radius: 8px;
  border: 1px solid #3d2010; background: #0d0505; color: #f5e6d3; margin-top: 0.25rem;
}
.form textarea { font-family: inherit; resize: vertical; min-height: 120px; }

/* Buttons */
.btn { padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; border: none; }
.btn-primary { background: #8B4513; color: #f5e6d3; }
.btn-primary:hover { background: #A0522D; }
.btn-outline { background: transparent; color: #A0522D; border: 1px solid #8B4513; }
.btn-outline:hover { background: rgba(139,69,19,0.2); }
.btn-sm { font-size: 0.85rem; padding: 0.4rem 0.75rem; }
.btn-block { width: 100%; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

/* Table */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #3d2010; }
th { color: #b8a090; font-weight: 600; font-size: 0.85rem; }
tr:hover { background: rgba(255,255,255,0.03); }
.actions-cell { white-space: nowrap; }
.actions-cell button { margin-right: 0.5rem; }

/* Photos cell (users list) */
.photos-cell-td { max-width: 320px; }
.photos-cell { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.photo-thumb-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.photo-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #3d2010; }
.btn-remove-photo { margin: 0; white-space: nowrap; }
.badge { font-size: 0.75rem; background: rgba(139,69,19,0.3); padding: 2px 6px; border-radius: 4px; }
.badge-ok { background: rgba(34, 139, 34, 0.25); color: #90ee90; }
.badge-pending { background: rgba(218, 165, 32, 0.25); color: #f0d060; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.user-record-modal {
  background: #1a0f08;
  border: 1px solid #3d2010;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #3d2010;
  flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 1.15rem; }
.modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}
.user-photo-mod {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.user-photo-mod-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid #3d2010;
}
.user-photo-mod-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #3d2010;
}
.user-photo-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.error { color: #c41e3a; font-size: 0.9rem; margin-top: 0.5rem; }

.screen { animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
