* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f0f0;
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  background: #bb0000;
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.header-logo svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.search-bar {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  height: 36px;
  border: none;
  border-radius: 18px;
  padding: 0 16px 0 40px;
  font-size: 0.9rem;
  background: #fff;
  color: #111;
  outline: none;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #888;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-actions .icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 6px;
  text-decoration: none;
}

.header-actions .icon-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* ── More menu (settings) ── */
.header-more-wrap { position: relative; }
.more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  display: none;
  z-index: 150;
}
.more-dropdown.open { display: block; }
.more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  color: #222;
  cursor: pointer;
  text-decoration: none;
}
.more-item:hover { background: #f5f5f5; }
.more-item .material-symbols-rounded { font-size: 18px; color: #666; }
.more-item.danger { color: #bb0000; }
.more-item.danger .material-symbols-rounded { color: #bb0000; }

.header-actions .points-count {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Layout ── */
.layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 56px);
}

/* ── Sidebar ── */
.sidebar {
  width: 200px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #111;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}

.sidebar a:hover {
  background: #f0f0f0;
}

.sidebar a.active {
  background: #f0f0f0;
  font-weight: 600;
}

.sidebar a .material-symbols-rounded {
  font-size: 1.2rem;
}

/* ── Content ── */
.content {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e5e5;
}

.card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: #999;
  font-size: 0.95rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #bb0000;
  color: #fff;
}

.btn-primary:hover {
  background: #a93226;
}

.btn-secondary {
  background: #f0f0f0;
  color: #111;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #888;
}

.empty-state .material-symbols-rounded {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

/* ── Block Avatar ── */
.block-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.block-avatar .ba-head {
  width: 22px;
  height: 22px;
  background: #888;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: inset -2px -2px 0 #666, inset 2px 2px 0 #aaa;
}
.block-avatar .ba-eye {
  width: 3px;
  height: 3px;
  background: #333;
  border-radius: 1px;
  position: absolute;
  top: 9px;
  z-index: 3;
}
.block-avatar .ba-eye.l { left: 17px; }
.block-avatar .ba-eye.r { right: 17px; }
.block-avatar .ba-mouth {
  width: 7px;
  height: 2px;
  background: #333;
  border-radius: 1px;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.block-avatar .ba-torso {
  width: 20px;
  height: 16px;
  background: #777;
  border-radius: 2px;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: inset -2px -2px 0 #555, inset 2px 2px 0 #999;
}
.block-avatar .ba-arm {
  width: 7px;
  height: 15px;
  background: #888;
  border-radius: 2px;
  position: absolute;
  top: 21px;
  z-index: 0;
  box-shadow: inset -1px -1px 0 #666, inset 1px 1px 0 #aaa;
}
.block-avatar .ba-arm.l { left: 7px; }
.block-avatar .ba-arm.r { right: 7px; }
.block-avatar .ba-leg {
  width: 9px;
  height: 16px;
  background: #666;
  border-radius: 0 0 2px 2px;
  position: absolute;
  top: 35px;
  z-index: 1;
  box-shadow: inset -1px -1px 0 #444, inset 1px 1px 0 #888;
}
.block-avatar .ba-leg.l { left: 14px; }
.block-avatar .ba-leg.r { right: 14px; }

.block-avatar-sm {
  width: 32px;
  height: 32px;
}
.block-avatar-sm .ba-head { width: 15px; height: 15px; border-radius: 2px; }
.block-avatar-sm .ba-eye { width: 2px; height: 2px; top: 6px; }
.block-avatar-sm .ba-eye.l { left: 11px; }
.block-avatar-sm .ba-eye.r { right: 11px; }
.block-avatar-sm .ba-mouth { width: 5px; height: 2px; top: 9px; }
.block-avatar-sm .ba-torso { width: 13px; height: 11px; top: 14px; }
.block-avatar-sm .ba-arm { width: 5px; height: 10px; top: 15px; }
.block-avatar-sm .ba-arm.l { left: 5px; }
.block-avatar-sm .ba-arm.r { right: 5px; }
.block-avatar-sm .ba-leg { width: 6px; height: 11px; top: 24px; }
.block-avatar-sm .ba-leg.l { left: 9px; }
.block-avatar-sm .ba-leg.r { right: 9px; }

/* ── Roles ── */
.role-icons { display:inline-flex; align-items:center; gap:2px; margin-left:4px; vertical-align:middle; }
.role-icon { color:#bb0000; font-size:1rem; line-height:1; }
.role-icon.verified { font-variation-settings: 'FILL' 1; }
.role-icon.admin { font-variation-settings: 'FILL' 1; }
.role-icon.partner { font-variation-settings: 'FILL' 1; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .sidebar {
    width: 56px;
    padding: 8px 4px;
  }
  .sidebar a span:not(.material-symbols-rounded) {
    display: none;
  }
  .sidebar a {
    justify-content: center;
    padding: 10px;
  }
  .content {
    padding: 20px 16px;
  }
}
